refactor: reorganizar docs y pocs bajo INFO/
- docs/ → INFO/DOCS/CONTEXT/ (documentación técnica en markdown) - FLUJOS/DOCS/ + FLUJOS_DATOS/DOCS/ → INFO/DOCS/ (txts de arquitectura) - POCS/ → INFO/POCS/ (pruebas de concepto) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
83f67b76b4
commit
954f47996f
33 changed files with 0 additions and 0 deletions
|
|
@ -1,69 +0,0 @@
|
|||
PROYECTO FLUJOS: DOCUMENTACIÓN
|
||||
|
||||
|
||||
===================================================================================================
|
||||
1. BASE DE DATOS (ELASTICSEARCH)
|
||||
a. Instalación:
|
||||
|
||||
# Sigue las instrucciones de la página oficial para descargar e instalar Elasticsearch y Kibana.
|
||||
b. Configuración de Elasticsearch:
|
||||
|
||||
# AÑADE O MODIFICA las siguientes líneas en el archivo elasticsearch.yml con tu editor de texto preferido, por ejemplo:
|
||||
nano config/elasticsearch.yml
|
||||
|
||||
network.host: localhost
|
||||
http.port: 9200
|
||||
c. Inicio de Elasticsearch:
|
||||
|
||||
# Desde la carpeta de Elasticsearch, ejecuta:
|
||||
bin/elasticsearch
|
||||
|
||||
d. Verificación:
|
||||
|
||||
# Ejecuta el siguiente comando para verificar:
|
||||
curl -X GET "http://localhost:9200/"
|
||||
|
||||
===================================================================================================
|
||||
2. SCRAPER (scraper.py)
|
||||
a. Ejecución:
|
||||
|
||||
# Asegúrate de estar en el directorio correcto y ejecuta:
|
||||
python3 scraper.py
|
||||
|
||||
===================================================================================================
|
||||
3. PROCESAMIENTO Y GUARDADO (guardar_datos.py)
|
||||
a. Ejecución:
|
||||
|
||||
# Asegúrate de estar en el directorio correcto y ejecuta:
|
||||
python3 guardar_datos.py
|
||||
|
||||
|
||||
===================================================================================================
|
||||
4. KIBANA
|
||||
a. Configuración:
|
||||
|
||||
# AÑADE O MODIFICA las siguientes líneas en el archivo kibana.yml con tu editor de texto preferido, por ejemplo:
|
||||
nano config/kibana.yml
|
||||
|
||||
elasticsearch.hosts: ["http://localhost:9200"]
|
||||
b. Inicio de Kibana:
|
||||
|
||||
# Desde la carpeta de Kibana, ejecuta:
|
||||
bin/kibana
|
||||
c. Acceso a Kibana:
|
||||
|
||||
# Abre tu navegador y ve a:
|
||||
http://localhost:5601
|
||||
|
||||
===================================================================================================
|
||||
|
||||
|
||||
sito@SIT0:~/PROGRAMACION/FLUJOS_TODO/FLUJOS_DATOS/elasticsearch-8.10.0/bin$ ./elasticsearch-reset-password -u elastic
|
||||
This tool will reset the password of the [elastic] user to an autogenerated value.
|
||||
The password will be printed in the console.
|
||||
Please confirm that you would like to continue [y/N]Y
|
||||
|
||||
|
||||
Password for the [elastic] user successfully reset.
|
||||
New value: VFe09fj6X*jqSZpyqZrb
|
||||
sito@SIT0:~/PROGRAMACION/FLUJOS_TODO/FLUJOS_DATOS/elasticsearch-8.10.0/bin$
|
||||
|
|
@ -1,112 +0,0 @@
|
|||
=============================================================================
|
||||
DOCUMENTACIÓN DEL PROYECTO FLUJOS
|
||||
=============================================================================
|
||||
|
||||
INTRODUCCIÓN:
|
||||
-------------
|
||||
El proyecto FLUJOS es una aplicación web diseñada para unir noticias y eventos del pasado para entender la historia como una sucesion de eventos .
|
||||
Combatir la desinformacion es el principal objetivo del proeycto .
|
||||
|
||||
ESTRUCTURA DEL PROYECTO:
|
||||
-------------------------
|
||||
El proyecto FLUJOS está organizado de la siguiente manera:
|
||||
|
||||
- /flujos: Carpeta principal del proyecto.
|
||||
- /BACK: Contiene los archivos y scripts relacionados con la parte del servidor y la base de datos.
|
||||
- /FRONT: Contiene los archivos de la aplicación web del lado del cliente.
|
||||
- /TENSOR_FLOW: Carpeta que alberga los componentes relacionados con TensorFlow y la inteligencia artificial.
|
||||
- /DOCUMENTACIÓN: Documentación técnica y de usuario.
|
||||
|
||||
INSTALACIÓN:
|
||||
------------
|
||||
Para configurar y ejecutar el proyecto FLUJOS, sigue estos pasos:
|
||||
|
||||
1. Clona el repositorio desde GitLab:
|
||||
|
||||
git clone https://gitlab.com/tu-usuario/flujos.git
|
||||
|
||||
|
||||
|
||||
2. Crea y activa un entorno virtual:
|
||||
|
||||
python3 -m venv env
|
||||
source env/bin/activate
|
||||
|
||||
|
||||
|
||||
3. Instala las dependencias:
|
||||
|
||||
pip install -r requirements.txt
|
||||
|
||||
|
||||
4. Configura la base de datos y realiza las migraciones:
|
||||
|
||||
python manage.py migrate
|
||||
|
||||
|
||||
|
||||
5. Crea un superusuario para administrar la aplicación:
|
||||
|
||||
python manage.py createsuperuser
|
||||
|
||||
|
||||
|
||||
EJECUCIÓN:
|
||||
----------
|
||||
Para ejecutar el proyecto FLUJOS en un entorno de desarrollo local, utiliza el siguiente comando:
|
||||
|
||||
python manage.py runserver
|
||||
|
||||
|
||||
|
||||
El proyecto estará disponible en http://localhost:8000/.
|
||||
|
||||
ESTRUCTURA DEL PROYECTO (DETALLES):
|
||||
-------------------------------------
|
||||
- /BACK: Esta carpeta contiene la lógica del servidor Django y se encarga de la autenticación de usuarios y la gestión de la base de datos.
|
||||
|
||||
- /FRONT: Aquí se encuentran los archivos estáticos y la interfaz de usuario de la aplicación web.
|
||||
|
||||
- /TENSOR_FLOW: Carpeta dedicada a las implementaciones de TensorFlow y el procesamiento de datos relacionado con la inteligencia artificial.
|
||||
|
||||
AUTENTICACIÓN DE USUARIOS:
|
||||
--------------------------
|
||||
El sistema de autenticación de usuarios permite a los usuarios registrarse, iniciar sesión y gestionar sus cuentas de usuario. Los datos se almacenan en una base de datos Elasticsearch.
|
||||
|
||||
ENVÍO DE CORREOS ELECTRÓNICOS:
|
||||
-------------------------------
|
||||
El proyecto FLUJOS incluye un sistema de envío de correos electrónicos para funciones como verificación de correo electrónico y recuperación de contraseñas.
|
||||
|
||||
SEGURIDAD Y PRIVACIDAD:
|
||||
-----------------------
|
||||
El proyecto FLUJOS se preocupa por la seguridad y privacidad de los usuarios y emplea medidas de seguridad estándar.
|
||||
|
||||
IMPLEMENTACIÓN DE PGP:
|
||||
----------------------
|
||||
El proyecto utiliza PGP para garantizar la seguridad de las comunicaciones entre periodistas y la aplicación web.
|
||||
|
||||
PRUEBAS:
|
||||
--------
|
||||
Para ejecutar las pruebas unitarias y de integración, utiliza el siguiente comando:
|
||||
|
||||
python manage.py test
|
||||
|
||||
|
||||
|
||||
DESPLEGUE:
|
||||
----------
|
||||
El despliegue del proyecto FLUJOS en un entorno de producción requiere [Instrucciones y mejores prácticas para desplegar el proyecto en un entorno de producción real].
|
||||
|
||||
CONTRIBUCIONES:
|
||||
---------------
|
||||
¡Agradecemos las contribuciones! Si deseas contribuir al proyecto, sigue las pautas en [Enlace a las pautas de contribución en GitLab].
|
||||
|
||||
CONTACTO:
|
||||
---------
|
||||
Para obtener ayuda o más información, comunícate con [Información de contacto].
|
||||
|
||||
LICENCIA:
|
||||
---------
|
||||
Este proyecto se distribuye bajo la licencia [Nombre de la licencia]. Consulta el archivo LICENSE para más detalles.
|
||||
|
||||
=============================================================================
|
||||
|
|
@ -1,33 +0,0 @@
|
|||
Since the beginning of the human era , we have had access to information , by asking , by reading , by watching .
|
||||
|
||||
But wasnt until the greedinesh of a few that appeard , that this access to information was limited .
|
||||
|
||||
What you denny submits you , what you accept transforms you .
|
||||
|
||||
Public information should be free to everybody .
|
||||
|
||||
Private information should be protected , so that no goverment or person cant apply to much power .
|
||||
|
||||
Dont trust the authority or the authority will eat your privileges .
|
||||
|
||||
One image talks more than 1000 words .
|
||||
One graph relates more than 1000 talks .
|
||||
|
||||
|
||||
The ability to correlate actions with speeches and vice versa
|
||||
gives you the power to know about the past .
|
||||
|
||||
He who controls the past controls the future .
|
||||
He who controls the present controls the past .
|
||||
|
||||
LOS GIGANTES VISTOS EN PERSPECTIVA
|
||||
PARECEN MARIONETAS
|
||||
|
||||
Lo que hay que tener es una premisa bien clara :
|
||||
Sin miedo no hay limites y sin limites no hay control.
|
||||
Sin control no hay limities y sin limites no hay miedo .
|
||||
|
||||
La cuestion no es cuando , la cuestion es como
|
||||
|
||||
Sabes , que hay debajo del asfalto ?
|
||||
EL MAR .
|
||||
|
|
@ -1,108 +0,0 @@
|
|||
┌──────────────────────────────────────────────────────────────────────────────────────────┐
|
||||
│ FLUJOS_APP.js /api/data │
|
||||
└──────────────────────────────────────────────────────────────────────────────────────────┘
|
||||
▲ ▲
|
||||
│ │
|
||||
│ │
|
||||
HTTP GET MongoDB
|
||||
/api/data?tema=… Collections
|
||||
│ ┌─────────────┐
|
||||
│ │ noticias │
|
||||
│ ├─────────────┤
|
||||
│ │ wikipedia │
|
||||
│ ├─────────────┤
|
||||
│ │ torrents │
|
||||
│ ├─────────────┤
|
||||
│ │ comparaciones│
|
||||
│ └─────────────┘
|
||||
│ │
|
||||
│ │
|
||||
▼ ▼
|
||||
|
||||
┌───────────────────────────────┐ ┌────────────────────────────────┐
|
||||
│ 1) Construcción de nodesQuery │ │ 3) Construcción de linksQuery │
|
||||
├───────────────────────────────┤ ├────────────────────────────────┤
|
||||
│ let nodesQuery = { │ │ let linksQuery = { │
|
||||
│ tema: <tema>, │ │ porcentaje_similitud: { │
|
||||
│ ...(subtematica?) │──┐ │ $gte: <complejidadMin> │
|
||||
│ ...(palabraClave?) │ │ │ }, │
|
||||
│ ...(fechaInicio/fechaFin?) │ │ │ noticia1: { $in: nodeIds }, │
|
||||
│ } │ │ │ noticia2: { $in: nodeIds } │
|
||||
└───────────────────────────────┘ │ └────────────────────────────────┘
|
||||
│ │ │
|
||||
│ │ │
|
||||
│ │ │
|
||||
▼ │ ▼
|
||||
|
||||
┌──────────────────────────────────────────────────────────────────────────────────────────┐
|
||||
│ 2) Búsqueda de nodos (Promise.all) │
|
||||
├──────────────────────────────────────────────────────────────────────────────────────────┤
|
||||
│ const [wN, nN, tN] = await Promise.all([ │
|
||||
│ wikipedia.find(nodesQuery).limit(nodosLimit), // → hasta N wikis │
|
||||
│ noticias.find(nodesQuery).limit(nodosLimit), // → hasta N noticias │
|
||||
│ torrents.find(nodesQuery).limit(nodosLimit) // → hasta N torrents │
|
||||
│ ]); │
|
||||
│ │
|
||||
│ // Formateo a “Graph Nodes”: │
|
||||
│ formattedNodes = [...wN, ...nN, ...tN].map(doc ⇒ ({ │
|
||||
│ id: doc.archivo.trim(), // identificador único │
|
||||
│ group: doc.subtema || 'sinSub', // color/agrupación visual │
|
||||
│ tema: doc.tema, // metadato │
|
||||
│ content: doc.texto, // para mostrar al hacer clic │
|
||||
│ fecha: doc.fecha // filtrado por fecha │
|
||||
│ })); │
|
||||
└──────────────────────────────────────────────────────────────────────────────────────────┘
|
||||
│
|
||||
│ // Extraer lista de IDs de nodos
|
||||
│ nodeIds = formattedNodes.map(n ⇒ n.id)
|
||||
│
|
||||
│
|
||||
▼
|
||||
|
||||
┌──────────────────────────────────────────────────────────────────────────────────────────┐
|
||||
│ 4) Búsqueda de enlaces (comparaciones.find) │
|
||||
├──────────────────────────────────────────────────────────────────────────────────────────┤
|
||||
│ const links = await comparaciones.find(linksQuery).toArray(); │
|
||||
│ │
|
||||
│ // linksQuery: │
|
||||
│ // { porcentaje_similitud: {$gte:Min}, noticia1:{$in:nodeIds}, noticia2:{$in:nodeIds} } │
|
||||
│ │
|
||||
│ // Formateo a “Graph Links”: │
|
||||
│ formattedLinks = links.map(l ⇒ ({ │
|
||||
│ source: l.noticia1.trim(), // coincide con node.id │
|
||||
│ target: l.noticia2.trim(), // idem │
|
||||
│ value: l.porcentaje_similitud // grosor de la arista │
|
||||
│ })); │
|
||||
└──────────────────────────────────────────────────────────────────────────────────────────┘
|
||||
│
|
||||
│
|
||||
▼
|
||||
|
||||
┌──────────────────────────────────────────────────────────────────────────────────────────┐
|
||||
│ 5) Respuesta al cliente │
|
||||
├──────────────────────────────────────────────────────────────────────────────────────────┤
|
||||
│ res.json({ │
|
||||
│ nodes: formattedNodes, // array de {id, group, tema, content, fecha} │
|
||||
│ links: formattedLinks // array de {source, target, value} │
|
||||
│ }); │
|
||||
└──────────────────────────────────────────────────────────────────────────────────────────┘
|
||||
|
||||
▲
|
||||
│
|
||||
│
|
||||
│
|
||||
fetch('/api/data?...')
|
||||
│
|
||||
▼
|
||||
|
||||
┌──────────────────────────────────────────────────────────────────────────────────────────┐
|
||||
│ output_glob_war_prueba.js │
|
||||
├──────────────────────────────────────────────────────────────────────────────────────────┤
|
||||
│ • Inicializa ForceGraph3D (contenedor DOM) │
|
||||
│ • getData(paramsObj) │
|
||||
│ └─ construye URL: '/api/data?tema=guerra%20global&...' │
|
||||
│ └─ fetch → recibe {nodes,links} │
|
||||
│ └─ filtra enlaces erróneos (source/target no existentes) │
|
||||
│ • graph.graphData(data) // renderiza nodos + enlaces │
|
||||
│ • UI: onNodeClick → showNodeContent(), sidebar form → re-getData() │
|
||||
└──────────────────────────────────────────────────────────────────────────────────────────┘
|
||||
|
|
@ -1,12 +0,0 @@
|
|||
========================
|
||||
INICIAR MONGODB
|
||||
========================
|
||||
|
||||
sudo systemctl start mongo
|
||||
|
||||
|
||||
========================
|
||||
INICIAR FLUJOS
|
||||
=======================
|
||||
|
||||
node /flujos/FLUJOS/BACK_BACK/FLUJOS_APP.js
|
||||
|
|
@ -1,172 +0,0 @@
|
|||
================================================================================
|
||||
EXTRAER INFO DE LA BASE DE DATOS — ESTADO DE DATOS FLUJOS_DATOS
|
||||
Fecha: 2026-04-01
|
||||
================================================================================
|
||||
|
||||
Este documento recoge el estado actual de los datos del proyecto FLUJOS,
|
||||
tanto en disco como en MongoDB, y los comandos necesarios para replicar
|
||||
esta extracción en cualquier momento futuro.
|
||||
|
||||
|
||||
================================================================================
|
||||
1. ESTADO DE MONGODB (base de datos: FLUJOS_DATOS)
|
||||
================================================================================
|
||||
|
||||
+------------------+----------------+------------------------------------------+
|
||||
| Colección | Documentos | Campos |
|
||||
+------------------+----------------+------------------------------------------+
|
||||
| comparaciones | 52.568.835 | noticia1, noticia2, porcentaje_similitud |
|
||||
| wikipedia | 25.448 | archivo, tema, subtema, fecha, texto |
|
||||
+------------------+----------------+------------------------------------------+
|
||||
|
||||
NOTA: NOTICIAS y WikiLeaks/Torrents NO están en MongoDB todavía.
|
||||
Solo existen como ficheros en disco.
|
||||
|
||||
|
||||
================================================================================
|
||||
2. ESTADO EN DISCO — ARCHIVOS FÍSICOS
|
||||
================================================================================
|
||||
|
||||
NOTICIAS
|
||||
+-------------------------------+-------------------------------+-----------+---------+
|
||||
| Sección | Directorio | Archivos | Tamaño |
|
||||
+-------------------------------+-------------------------------+-----------+---------+
|
||||
| Artículos (txt scrapeados) | NOTICIAS/articulos/ | 41.467 | |
|
||||
| Archivos raw (PDF, HTML...) | NOTICIAS/archivos/ | 1.870 | |
|
||||
| TOTAL NOTICIAS | | 43.337 | 1.9 GB |
|
||||
+-------------------------------+-------------------------------+-----------+---------+
|
||||
|
||||
WIKIPEDIA
|
||||
+-------------------------------+--------------------------------------+-----------+---------+
|
||||
| Sección | Directorio | Archivos | Tamaño |
|
||||
+-------------------------------+--------------------------------------+-----------+---------+
|
||||
| Artículos Wikipedia | WIKIPEDIA/articulos_wikipedia/ | 25.448 | |
|
||||
| Artículos tokenizados | WIKIPEDIA/articulos_tokenizados/ | 25.448 | |
|
||||
| TOTAL WIKIPEDIA | (25.448 artículos + sus tokens) | 50.896 | 611 MB |
|
||||
+-------------------------------+--------------------------------------+-----------+---------+
|
||||
|
||||
TORRENTS / WIKILEAKS
|
||||
+-------------------------------+------------------------------------------+-----------+---------+
|
||||
| Sección | Directorio | Archivos | Tamaño |
|
||||
+-------------------------------+------------------------------------------+-----------+---------+
|
||||
| Textos extraídos | TORRENTS/TORRENTS_WIKILEAKS_COMPLETO/txt/| 36.183 | |
|
||||
| Tokenizados | TORRENTS/TORRENTS_WIKILEAKS_COMPLETO/ | | |
|
||||
| | tokenized/ | 36.183 | |
|
||||
| TOTAL TORRENTS | | 72.370 | 1.1 GB |
|
||||
+-------------------------------+------------------------------------------+-----------+---------+
|
||||
|
||||
MongoDB (datos físicos en disco)
|
||||
+-------------------------------+-----------+
|
||||
| Directorio MONGO/ | Tamaño |
|
||||
+-------------------------------+-----------+
|
||||
| MONGO/ | 3.2 GB |
|
||||
+-------------------------------+-----------+
|
||||
|
||||
|
||||
================================================================================
|
||||
3. COMPARACIONES — AVANCE DEL PROCESADO
|
||||
================================================================================
|
||||
|
||||
Las 52.5M comparaciones corresponden a artículos WIKIPEDIA cruzados entre sí
|
||||
(los nombres en la colección son del tipo "ISO_IEC 27032.txt",
|
||||
"Auditorio _Benito Juárez_.txt", etc.).
|
||||
|
||||
Estimación matemática usando N*(N-1)/2 = total_comparaciones:
|
||||
sqrt(2 * 52.568.835) ≈ 10.254 artículos ya cruzados entre sí
|
||||
|
||||
+---------------------------+-----------+-----------+-----------+
|
||||
| | Wikipedia | NOTICIAS | WikiLeaks |
|
||||
+---------------------------+-----------+-----------+-----------+
|
||||
| Archivos en disco | 25.448 | 43.337 | 36.183 |
|
||||
| Cargados en MongoDB | 25.448 ✓ | 0 ✗ | 0 ✗ |
|
||||
| Artículos comparados | ~10.254 | - | - |
|
||||
| % comparado | ~40% | - | - |
|
||||
| Artículos pendientes | ~15.194 | - | - |
|
||||
| Pares pendientes aprox. | ~115M | - | - |
|
||||
+---------------------------+-----------+-----------+-----------+
|
||||
|
||||
|
||||
================================================================================
|
||||
4. COMANDOS UTILIZADOS PARA EXTRAER ESTA INFORMACIÓN
|
||||
================================================================================
|
||||
|
||||
--- Ver variable de entorno y configuración MongoDB ---
|
||||
|
||||
cat /var/www/theflows.net/flujos/.env
|
||||
|
||||
|
||||
--- Listar colecciones en MongoDB ---
|
||||
|
||||
mongosh --quiet FLUJOS_DATOS --eval "db.getCollectionNames()"
|
||||
|
||||
|
||||
--- Contar documentos por colección ---
|
||||
|
||||
mongosh --quiet FLUJOS_DATOS --eval "
|
||||
db.getCollectionNames().forEach(col => {
|
||||
print(col + ': ' + db[col].countDocuments() + ' docs');
|
||||
})"
|
||||
|
||||
|
||||
--- Ver colecciones con campos y conteo ---
|
||||
|
||||
mongosh --quiet FLUJOS_DATOS --eval "
|
||||
db.getCollectionNames().forEach(col => {
|
||||
var count = db[col].countDocuments();
|
||||
var sample = db[col].findOne();
|
||||
var keys = sample ? Object.keys(sample).join(', ') : 'empty';
|
||||
print(col + ': ' + count + ' docs | fields: ' + keys);
|
||||
})"
|
||||
|
||||
|
||||
--- Ver un documento de muestra de comparaciones ---
|
||||
|
||||
mongosh --quiet FLUJOS_DATOS --eval "
|
||||
var s = db.comparaciones.findOne();
|
||||
print(JSON.stringify(s, null, 2));"
|
||||
|
||||
|
||||
--- Contar archivos en disco por sección ---
|
||||
|
||||
# NOTICIAS artículos
|
||||
find /var/www/theflows.net/flujos/FLUJOS_DATOS/NOTICIAS/articulos/ -type f | wc -l
|
||||
|
||||
# NOTICIAS archivos raw
|
||||
find /var/www/theflows.net/flujos/FLUJOS_DATOS/NOTICIAS/archivos/ -type f | wc -l
|
||||
|
||||
# WIKIPEDIA artículos
|
||||
find /var/www/theflows.net/flujos/FLUJOS_DATOS/WIKIPEDIA/articulos_wikipedia/ -type f | wc -l
|
||||
|
||||
# WIKIPEDIA tokenizados
|
||||
find /var/www/theflows.net/flujos/FLUJOS_DATOS/WIKIPEDIA/articulos_tokenizados/ -type f | wc -l
|
||||
|
||||
# TORRENTS total
|
||||
find /var/www/theflows.net/flujos/FLUJOS_DATOS/TORRENTS/ -type f | wc -l
|
||||
|
||||
# WikiLeaks txt
|
||||
find /var/www/theflows.net/flujos/FLUJOS_DATOS/TORRENTS/TORRENTS_WIKILEAKS_COMPLETO/txt/ -type f | wc -l
|
||||
|
||||
# WikiLeaks tokenizados
|
||||
find /var/www/theflows.net/flujos/FLUJOS_DATOS/TORRENTS/TORRENTS_WIKILEAKS_COMPLETO/tokenized/ -type f | wc -l
|
||||
|
||||
|
||||
--- Tamaño en disco por sección ---
|
||||
|
||||
du -sh /var/www/theflows.net/flujos/FLUJOS_DATOS/NOTICIAS/
|
||||
du -sh /var/www/theflows.net/flujos/FLUJOS_DATOS/WIKIPEDIA/
|
||||
du -sh /var/www/theflows.net/flujos/FLUJOS_DATOS/TORRENTS/
|
||||
du -sh /var/www/theflows.net/flujos/FLUJOS_DATOS/MONGO/
|
||||
|
||||
|
||||
--- Estimación de artículos únicos comparados (cálculo matemático) ---
|
||||
|
||||
mongosh --quiet FLUJOS_DATOS --eval "
|
||||
var total = db.comparaciones.countDocuments();
|
||||
var approxN = Math.round(Math.sqrt(2 * total));
|
||||
print('Total comparaciones: ' + total);
|
||||
print('Artículos únicos comparados (estimación): ' + approxN);"
|
||||
|
||||
|
||||
================================================================================
|
||||
FIN DEL DOCUMENTO
|
||||
================================================================================
|
||||
|
|
@ -1,38 +0,0 @@
|
|||
# COMANDOS SSHPASS - TRANSFERENCIA FLUJOS_DATOS
|
||||
# Servidor destino: d1d4k@server045151.vps.webdock.cloud
|
||||
# Fecha: 2026-04-01
|
||||
# =====================================================
|
||||
|
||||
# 1. VERIFICAR QUE SSHPASS ESTÁ INSTALADO
|
||||
which sshpass || sudo apt install sshpass -y
|
||||
|
||||
# 2. TRANSFERIR SOLO ARCHIVOS .txt (tokenizados/raw)
|
||||
sshpass -p 'TU_PASSWORD' rsync -avz --progress \
|
||||
--include='*/' \
|
||||
--include='*.txt' \
|
||||
--exclude='*' \
|
||||
/var/www/theflows.net/flujos/FLUJOS_DATOS/ \
|
||||
d1d4k@server045151.vps.webdock.cloud:/home/d1d4k/UP-LEAKS/FLUJOS/FLUJOS_DATOS/
|
||||
|
||||
# 3. TRANSFERIR TODO (excluyendo virtualenv, logs mongo y cache)
|
||||
sshpass -p 'TU_PASSWORD' rsync -avz --progress \
|
||||
--exclude='myenv/' \
|
||||
--exclude='MONGO/' \
|
||||
--exclude='__pycache__/' \
|
||||
/var/www/theflows.net/flujos/FLUJOS_DATOS/ \
|
||||
d1d4k@server045151.vps.webdock.cloud:/home/d1d4k/UP-LEAKS/FLUJOS/FLUJOS_DATOS/
|
||||
|
||||
# 4. SOLO .txt DE SUBCARPETAS ESPECÍFICAS (TORRENTS + NOTICIAS + WIKIPEDIA)
|
||||
for DIR in TORRENTS NOTICIAS WIKIPEDIA; do
|
||||
sshpass -p 'TU_PASSWORD' rsync -avz --progress \
|
||||
--include='*/' --include='*.txt' --exclude='*' \
|
||||
/var/www/theflows.net/flujos/FLUJOS_DATOS/$DIR/ \
|
||||
d1d4k@server045151.vps.webdock.cloud:/home/d1d4k/UP-LEAKS/FLUJOS/FLUJOS_DATOS/$DIR/
|
||||
done
|
||||
|
||||
# NOTAS:
|
||||
# - Reemplazar TU_PASSWORD con la contraseña real antes de ejecutar
|
||||
# - myenv/ excluido: virtualenv, inútil en destino
|
||||
# - MONGO/ excluido: logs de bd, no son datos de texto
|
||||
# - rsync crea el directorio destino si no existe
|
||||
# - Añadir --dry-run para simular sin transferir nada
|
||||
Loading…
Add table
Add a link
Reference in a new issue