This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ### Version1 | |
| ExecutorService executor = Executors.newFixedThreadPool(Runtime.getRuntime().availableProcessors()); | |
| List<Callable<List<String>>> tareas = new ArrayList<>(); | |
| int chunkSize = usuarios.size() / Runtime.getRuntime().availableProcessors(); | |
| for (int i = 0; i < usuarios.size(); i += chunkSize) { | |
| int start = i; | |
| int end = Math.min(i + chunkSize, usuarios.size()); | |
| tareas.add(() -> { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env bash | |
| set -euo pipefail | |
| IFS=$'\n' | |
| ##### CONFIGURACIÓN ##### | |
| OUTPUT_DIR="./output" | |
| SKIP_PDF=false | |
| SEND_MAIL=false | |
| EMAIL_RECIPIENT="example@example.com" | |
| HELP=false |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| set -e | |
| # ==================== COLORES ==================== | |
| RED='\033[0;31m' | |
| GREEN='\033[0;32m' | |
| YELLOW='\033[1;33m' | |
| BLUE='\033[1;34m' | |
| NC='\033[0m' # Sin color |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| nasm -f macho64 fast_memcpy.asm -o fast_memcpy.o | |
| clang -O2 test_memcpy.c fast_memcpy.o -o test_memcpy | |
| ./test_memcpy |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import asyncio | |
| import os | |
| from textwrap import dedent | |
| from pyspark.sql import SparkSession | |
| from pyspark.sql.functions import col | |
| from agno.agent import Agent | |
| from agno.models.openai import OpenAIChat | |
| import requests | |
| from dotenv import load_dotenv | |
| import logging |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # filepath: /Users/aironman/git/python-samples-2025/src/python_samples_2025/agno/agno-sample.py | |
| import os | |
| from agno.agent import Agent | |
| from agno.models.openai import OpenAIChat | |
| from dotenv import load_dotenv | |
| load_dotenv() | |
| # Obtén el token de la variable de entorno | |
| openai_api_key = os.getenv("OPENAI_API_KEY") | |
| if not openai_api_key: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ┌<▸> ~/g/python-samples-2025 | |
| └➤ poetry run python src/python_samples_2025/rag_ollama_transcriber.py | |
| ❌ Ollama no está corriendo. Intentando iniciarlo... | |
| ⏳ Iniciando Ollama... | |
| ✅ Ollama está listo. | |
| Modelos disponibles en Ollama: | |
| 1. my-codellama:latest | |
| 2. codellama:latest | |
| 3. neural-chat:latest | |
| 4. llama2:latest |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/zsh | |
| # Título del script | |
| echo "\n=============================================" | |
| echo " ANALIZADOR DE ESPACIO EN DISCO PARA MACOS" | |
| echo "=============================================\n" | |
| # Información general del sistema | |
| echo "INFORMACIÓN DEL SISTEMA:" | |
| echo "---------------------------------------------" |
time gcc -o scraper scrapper_multi_thread.c -lcurl -pthread -Wall -Wextra -O2 gcc -o scraper scrapper_multi_thread.c -lcurl -pthread -Wall -Wextra -O2 0.17s user 0.08s system 104% cpu 0.239 total
time ./scraper https://www.omg.org 3 4 [MAIN] Hilo 0 creado [MAIN] Hilo 1 creado [HILO 123145548595200] Iniciado [HILO 123145549131776] Iniciado [HILO 123145548595200] Esperando URLs... [HILO 123145549668352] Iniciado
NewerOlder