ch
Feedback
Aprende Python

Aprende Python

前往频道在 Telegram

Recursos de aprendizaje para Python, Dango y Flask. Contacto @JoseAJimenez #Python #recursos

显示更多
5 310
订阅者
无数据24 小时
+177
+8630
帖子存档
Repost from Python/ django
🖥 Excel File Automation Создание и работа с excel-файлами с помощью python-скрипта. from openpyxl import Workbook from openp
🖥 Excel File Automation Создание и работа с excel-файлами с помощью python-скрипта. from openpyxl import Workbook from openpyxl.utils import get_column_letter from openpyxl.styles import Font #making the grid and giving the data data = { "Joe": { "math": 65, "science": 78, "english": 98, "gym": 89 }, "Bill": { "math": 55, "science": 72, "english": 87, "gym": 95 }, "Tim": { "math": 100, "science": 45, "english": 75, "gym": 92 }, "Sally": { "math": 30, "science": 25, "english": 45, "gym": 100 }, "Jane": { "math": 100, "science": 100, "english": 100, "gym": 60 } } wb = Workbook() ws = wb.active #assigning the title ws.title = "Grades" #giving proper formatting for columns headings = ['Name'] + list(data['Joe'].keys()) ws.append(headings) #reading the data for persom for person in data: grades = list(data[person].values()) ws.append([person] + grades) for col in range(2, len(data['Joe']) + 2): char = get_column_letter(col) ws[char + "7"] = f"=SUM({char + '2'}:{char + '6'})/{len(data)}" #assigning the colour and text type for col in range(1, 6): ws[get_column_letter(col) + '1'].font = Font(bold=True, color="0099CCFF") #saving the excel file in the same folder wb.save("NewGrades.xlsx") @pythonl

Repost from Python/ django
📹 Simple Screen Recording with Python. Делаем запись экрана с помощью Python. 📌Code @pythonl
+1
📹 Simple Screen Recording with Python. Делаем запись экрана с помощью Python. 📌Code @pythonl

🎤🔤 Embrace the Power of Speech-to-Text in Python! pip install SpeechRecognition import speech_recognition as sr recognizer
🎤🔤 Embrace the Power of Speech-to-Text in Python! pip install SpeechRecognition import speech_recognition as sr recognizer = sr.Recognizer() with sr.Microphone() as source: print("Say something...") recognizer.adjust_for_ambient_noise(source) # Optional: Adjust for background noise audio = recognizer.listen(source) audio_file = "path/to/your/audio_file.wav" # Replace with the path to your audio file with sr.AudioFile(audio_file) as source: audio = recognizer.listen(source) try: print("Converting speech to text...") text = recognizer.recognize_google(audio) print("You said:", text) except sr.UnknownValueError: print("Google Speech Recognition could not understand the audio.") except sr.RequestError as e: print("Could not request results from Google Speech Recognition service; {0}".format(e)) https://t.me/CodeProgrammer

Buenas. Ya estamos en Agosto, como comente a lo largo del mes este canal estará en modo vacaciones hasta Septiembre, eso significa que publicare contenido de una forma mas relajada, una vez por semana, espero que moleste pero el mes de Agosto lo necesito para recuperar fuerzas. Un saludo.

Anuncio el sistema de invitados del canal de Telegram Un Día Una Aplicación. El sistema es simple, si te suscribes al canal podrás invitar a un usuario, hasta máximo dosis meses, en función del tiempo que pague la suscripción. Si pagas un mes el invitado obtiene un mes, si pagas dos meses, el invitado obtiene dos meses gratis de acceso al canal, finalizado ese plazo de dos meses el invitado no tendrás más meses gratis. Sólo debe proporcionarme la persona que paga la suscripción el alias de Telegram del invitado . Este sistema tiene las siguiente normas. ▪️Sólo se puede ser invitado una vez al año, haya tenido un mes o dos meses gratis. ▪️ Sólo puede existir un invitado por suscriptor , aunque ese suscriptor sigue puede tener varios invitados consecutivos. Por ejemplo, el suscriptor paga dos meses y tiene un invitado, los siguientes dos meses tiene otro invitado. Como máximo el suscriptor solo podrá tener 6 meses con invitados. ▪️El sistema de invitados es opcional, el suscriptor decide cuando y si quiere invitar, siempre cumpliendo las normas anteriores. ▪️Es obligatorio que el invitado tenga alias de Telegram . El nombre que empieza con @ Cualquier duda me lo preguntáis en mi cuenta @JoseAJimenez. Para el pago de la suscripción al canal, 3€ al mes https://t.me/+fQhsFUJto6lkYjA0

Con este periodo de vacacional recordad que tenéis varias forma para realizar pequeñas aportaciones, os lo agradeceré mucho y siempre es una forma de valorar mi tiempo. Ademas es un factor motivante muy grande. Ko-fi https://ko-fi.com/josjimenez Buy me Coffe https://buymeacoffee.com/jajt PayPal https://paypal.me/JoseAJimenez Amazon afiliados https://amzn.to/3s0zEk2 También podeis probar el servicio de IGraal que devuelven parte del importe de las compras realizas un muchas tiendas. iGraal https://es.igraal.com/padrinazgo?padrino=AG_6335a460d3e92

Hasta finales de Julio me tomare un descanso, no voy a publicar contenido, en Agosto volveré aunque de un forma mas relajada, lo que yo llamo estará el canal en modo vacaciones, publicaré contenido pero con menos periodicidad. En Septiembre volveré con la periodicidad habitual. Que tengas buenas vacaciones y buen descanso. Un saludo.

Como limpiar código no usado utilizando la herramienta Vulture, que fue la primera herramienta que publique en mi otro canal de Python @UnPythonAlDia https://bit.ly/3rqo0D1 #optimizacion Apoyame, lo agradecería mucho y es un factor motivante muy importante. Ko-fi https://ko-fi.com/josjimenez Buy me Coffe https://buymeacoffee.com/jajt PayPal https://paypal.me/JoseAJimenez Amazon afiliados https://amzn.to/3s0zEk2

Repost from Python/ django
🚀 Python code that can send WhatsApp messages, send emails, and send SMS messages to a number. Python-скрипты для отправки с
🚀 Python code that can send WhatsApp messages, send emails, and send SMS messages to a number. Python-скрипты для отправки сообщений WhatsApp, электронных письмем и SMS-сообщений. @pythonl

Artículo donde explican como aumentar la velocidad de Python usando Rust. https://bit.ly/3riCxQS #optimizacion

Python se utiliza en múltiples ámbitos sitios y uno de ellos es el campo de la Estadística, en el siguiente artículo explica como utilizar Python para modelos estadísticos, que herramienta hay disponible y ejemplos de uso. https://bit.ly/3OcVIVx #estadistica Apoyame, lo agradecería mucho y es un factor motivante muy importante. Ko-fi https://ko-fi.com/josjimenez Buy me Coffe https://buymeacoffee.com/jajt PayPal https://paypal.me/JoseAJimenez Amazon afiliados https://amzn.to/3s0zEk2

YA TENEMOS  PRIME DAY !!! El 12 y 13 de Julio muchas ofertas en Amazon ,solo para clientes de Amazon Prime. Si no eres cliente de ese servicio  no te preocupes, puedes apuntarte utilizar el periodo de PRUEBA con los siguientes . Amazon Prime (1 mes de prueba) https://amzn.to/3xnYc9a Si eres estudiante, puede utilizar Amazon Prime Student((90 días de prueba) https://amzn.to/3nQZvKR Si ya eres cliente de Amazon Prime puedes utilizar mi enlace de referido  Utiliza mi link, me podrás apoyar sin gastar dinero y aprovechar todas las ofertas del Primer Day https://amzn.to/3s0zEk2 También puede apuntarte al periodo de PRUEBA del servicios de audiolibro de Amazon que se llama Audible, que ahora han subido la comisión que recibo. Si quieres probarlo y ayudarme . https://www.amazon.es/hz/audible/mlp/mdp/discovery?actionCode=AMSTM1450129210001&tag=rooteando0e-21 Estas aportaciones me permitirán sostener mis proyecto actuales y futuros, mejorar mi equipo, para un nuevo micro y brazo por ejemplo. Muchas gracias por el apoyo.

Repost from Python/ django
🚀 Pairing Telegram data with Python. Read and analyze chat messages Парсим данные в Telegram на Python. Читаем и анализируем сообщения из чатов. from xmlrpc.client import DateTime from telethon.sync import TelegramClient from telethon.tl.functions.messages import GetDialogsRequest from telethon.tl.types import InputPeerEmpty from telethon.tl.functions.messages import GetHistoryRequest from telethon.tl.types import PeerChannel import csv api_id = 'api id' api_hash = "api_hash" phone = "phone number" client = TelegramClient(phone, api_id, api_hash) client.start() chats = [] last_date = None chunk_size = 200 groups=[] result = client(GetDialogsRequest( offset_date=last_date, offset_id=0, offset_peer=InputPeerEmpty(), limit=chunk_size, hash = 0 )) chats.extend(result.chats) for chat in chats: try: if chat.megagroup== True: groups.append(chat) except: continue print("Выберите группу для парсинга сообщений и членов группы:") i=0 for g in groups: print(str(i) + "- " + g.title) i+=1 g_index = input("Введите нужную цифру: ") target_group=groups[int(g_index)] print("Узнаём пользователей...") all_participants = [] all_participants = client.get_participants(target_group) print("Сохраняем данные в файл...") with open("members.csv", "w", encoding="UTF-8") as f: writer = csv.writer(f,delimiter=",",lineterminator="\n") writer.writerow(["username", "name","group"]) for user in all_participants: if user.username: username= user.username else: username= "" if user.first_name: first_name= user.first_name else: first_name= "" if user.last_name: last_name= user.last_name else: last_name= "" name= (first_name + ' ' + last_name).strip() writer.writerow([username,name,target_group.title]) print("Парсинг участников группы успешно выполнен.") offset_id = 0 limit = 100 all_messages = [] total_messages = 0 total_count_limit = 0 while True: history = client(GetHistoryRequest( peer=target_group, offset_id=offset_id, offset_date=None, add_offset=0, limit=limit, max_id=0, min_id=0, hash=0 )) if not history.messages: break messages = history.messages for message in messages: all_messages.append(message.message) offset_id = messages[len(messages) - 1].id if total_count_limit != 0 and total_messages >= total_count_limit: break print("Сохраняем данные в файл...") with open("chats.csv", "w", encoding="UTF-8") as f: writer = csv.writer(f, delimiter=",", lineterminator="\n") for message in all_messages: writer.writerow([message]) print('Парсинг сообщений группы успешно выполнен.') @pythonl

#donate

Si quieres apoyarme y realizar una pequeña aportación económica, será una buena motivación y una forma de valorar el tiempo que le dedico a los canales de Python. Podeís hacerlo por los métodos publicados en los mensajes(Kofi, PayPal, Buy me Coffe o Amazon Afiliados), también utilizando Telegram para donar.

Repost from Python/ django
🕸 Python Web Scraping Этот исчерпывающий список содержит библиотеки python, связанные с веб-парсингом и обработкой данных. W
🕸 Python Web Scraping Этот исчерпывающий список содержит библиотеки python, связанные с веб-парсингом и обработкой данных. Web Scraping: Frameworks scrapy - web-scraping framework (twisted based). pyspider - A powerful spider system. autoscraper - A smart, automatic and lightweight web scraper grab - web-scraping framework (pycurl/multicurl based) ruia - Async Python 3.6+ web scraping micro-framework based on asyncio cola - A distributed crawling framework. frontera - A scalable frontier for web crawlers dude - A simple framework for writing web scrapers using decorators. ioweb - Web scraping framework based on gevent and lxml Web Scraping : Tools portia - Visual scraping for Scrapy. restkit - HTTP resource kit for Python. It allows you to easily access to HTTP resource and build objects around it. requests-html - Pythonic HTML Parsing for Humans. ScrapydWeb - A full-featured web UI for Scrapyd cluster management, which supports Scrapy Log Analysis & Visualization, Auto Packaging, Timer Tasks, Email Notice and so on. Starbelly - Starbelly is a user-friendly and highly configurable web crawler front end. Gerapy - Distributed Crawler Management Framework Based on Scrapy, Scrapyd, Django and Vue.js Web Scraping : Bypass Protection cloudscraper - A Python module to bypass Cloudflare's anti-bot page. ▪ GIthub @pythonl

Artículo que introduce a los conceptos de Manager y QuerySet en Django con un ejemplo donde muestra sus diferencias, virtudes y defectos. https://bit.ly/3D47Dyg #django #bd Apoyame, lo agradecería mucho y es un factor motivante muy importante. Ko-fi https://ko-fi.com/josjimenez Buy me Coffe https://buymeacoffee.com/jajt PayPal https://paypal.me/JoseAJimenez Amazon afiliados https://amzn.to/3s0zEk2

El siguiente artículo no es de desarrollo propiamente dicho, pero me ha parecido muy interesante, y desconocido para mi, lo que explica. Dentro de la librería estandar de Python tenemos un conjunto de módulo que se pueden utilizar como herramienta para terminal con python -m nombre_modulo. En el siguiente artículo muestra como ha descubierto todas esas herramientas y explica alguna de ellas. https://bit.ly/3pvLKoH #CLI Apoyame, lo agradecería mucho y es un factor motivante muy importante. Ko-fi https://ko-fi.com/josjimenez Buy me Coffe https://buymeacoffee.com/jajt PayPal https://paypal.me/JoseAJimenez Amazon afiliados https://amzn.to/3s0zEk2