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
#Crea códigos de Barras con Python por #Tecsify | |
#Importamos las librerías necesarias | |
from barcode import EAN13 | |
from barcode.writer import ImageWriter | |
# Establecemos el directorio donde será guardado | |
directorio = r'C:\Users\Documentos\Tecsify' | |
# Establecemos el numero del código de barras |
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
#Crea códigos QR personalizados con Python por #Tecsify | |
import qrcode | |
from PIL import Image | |
imagenlogo = r'C:\Users\Directorio\imagen.jpg' | |
logo = Image.open(imagenlogo) | |
# Ajustamos el tamaño de la imagen | |
hsize = int((float(logo.size[1])*float(100/float(logo.size[0])))) |
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
#Comprime Archivos con Python por #Tecsify | |
import zipfile_zstd as zp | |
#Creamos el Archivo, en este caso un tipo .zip (la 'w' es de write) | |
nuevozip = zp.ZipFile(r'C:\Directorio\Tecsify.zip', 'w') | |
#Agregamos los archivos que contendrá nuestro comprimido, en este caso estos 3: | |
nuevozip.write(r'C:\Directorio\Archivo_Uno.mp3', compress_type=zp.ZIP_DEFLATED) | |
nuevozip.write(r'C:\Directorio\Archivo_Dos.pdf', compress_type=zp.ZIP_DEFLATED) |
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
"""Obten el precio de criptomonedas con Python por #Tecsify | |
¡Tecnología que empodera!""" | |
import cryptocompare as cc | |
import datetime | |
coin = cc.get_price('DOGE', currency='USD') | |
print(coin) | |
coin = cc.get_price('SHIB', currency='COL') |
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
"""Procesamiento de imágenes con Python por #Tecsify | |
Puedes ver la guía completa de este código en nuestro blog: | |
https://tecsify.com/blog/guia-imagenes-python/ """ | |
from PIL import Image, ImageFilter | |
DirectorioImagen = r'Directorio\Tecsify.png' | |
img = Image.open(DirectorioImagen).convert('LA') | |
img.show() |
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
"""Aprende como traducir cualquier Texto con Python por #Tecsify | |
¡Tecnología que empodera!""" | |
from deep_translator import GoogleTranslator | |
# - - Esta parte del código traduce únicamente un texto plano | |
traductor = GoogleTranslator(source='es', target='en') | |
resultado = traductor.translate("La educación es el arma más poderosa para cambiar al mundo") | |
print(resultado) | |
#----------------------------------------------------------------------------- |
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
"""Ingeniería inversa a la Web con Python por Tecsify | |
¡Tecnología que empodera!""" | |
import webtech | |
wt = webtech.WebTech() | |
pagina = "https://www.Tecsify.com" | |
results = wt.start_from_url(pagina, timeout = 1) | |
print(results) | |
#www.Tecsify.com/blog |
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
"""Convierte texto a voz con Python por Tecsify | |
¡Tecnología que empodera!""" | |
from gtts import gTTS | |
import os | |
texto = input() | |
tts = gTTS(text=texto, lang = 'es') | |
tts.save("tecsify.mp3") | |
os.system("tecsify.mp3") |
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
"""Resumenes de Wikipedia con Python por Tecsify | |
¡Tecnología que empodera!""" | |
import wikipedia | |
wikipedia.set_lang("es") | |
print(wikipedia.summary("Nikola Tesla", sentences=1)) | |
#www.Tecsify.com/blog |
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
# Tecsify ¡Tecnología que empodera! | |
variable = "Hola Mundo!" | |
print(variable) | |
""" | |
www.Tecsify.com/blog | |
""" |
NewerOlder