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
# Automatizaci贸n de algunos proyectos ----> llama scripts de otros ejercicios | |
import subprocess | |
def organizar_fotos(): | |
subprocess.run(["python", "4. Organizar fotos por fecha.py"]) | |
def actualizar_gastos(): | |
subprocess.run(["python", "5. Resumen tabla de gastos.py"]) | |
def enviar_notificacion(): |
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 speech_recognition as sr | |
from datetime import datetime | |
import threading | |
reconocedor = sr.Recognizer() | |
detener_grabacion = False | |
# Creaci贸n de una funci贸n que espera que el usuario presione ENTER | |
def escuchar_tecla_enter(): | |
global detener_grabacion |
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
from newspaper import Article | |
import nltk | |
# Descarga los recursos de NLTK (solo hay que hacerlo una vez) | |
nltk.download('punkt') # "Tokenizador de texto" | |
nltk.download('punkt_tab') # reglas de tokenizaci贸n inteligente | |
url = "https://www.ara.cat/societat/salut/tecniques-no-suar-dorms-l-estiu_1_5453987.html" | |
article = Article(url) # Creaci贸n objeto | |
article.download() # Descargar |
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 pandas as pd | |
import matplotlib.pyplot as plt | |
print(" An谩lisis de Gastos ") | |
print("=" * 40) | |
# Leer los datos | |
df = pd.read_csv("gastos.csv", parse_dates=["fecha"]) | |
# Crear columna de mes |
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 os | |
from PIL import Image | |
from PIL.ExifTags import TAGS | |
from datetime import datetime | |
def ordenar_fotos(): | |
carpeta_origen = os.path.dirname(__file__) | |
carpeta_destino = os.path.join(carpeta_origen, "Fotos_Ordenadas") | |
os.makedirs(carpeta_destino, exist_ok=True) |
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
from telegram import Bot | |
import schedule | |
import time | |
import asyncio | |
print(" Bot de Telegram - RECORDATORIO ") | |
print("=" * 40) | |
# IMPORTANTE -----> SUSTITUIR por los datos correctos | |
TOKEN = "tu token del botFather" # Tu token del BotFather |
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 os | |
import shutil | |
import re | |
os.chdir("Descargas") | |
carpeta_facturas = "Facturas" | |
os.makedirs(carpeta_facturas, exist_ok=True) | |
for archivo in os.listdir(): |