Python/ django
по всем вопросам @workakkk @itchannels_telegram - 🔥 все ит каналы @ai_machinelearning_big_data -ML @ArtificialIntelligencedl -AI @datascienceiot - 📚 @pythonlbooks РКН: clck.ru/3FmxmM
Mostrar más📈 Análisis del canal de Telegram Python/ django
El canal Python/ django (@pythonl) en el segmento lingüístico de Ruso es un actor destacado. Actualmente la comunidad reúne a 58 385 suscriptores, ocupando la posición 2 244 en la categoría Tecnologías y Aplicaciones y el puesto 10 292 en la región Rusia.
📊 Métricas de audiencia y dinámica
Desde su creación el невідомо, el proyecto ha mostrado un crecimiento acelerado, reuniendo a 58 385 suscriptores.
Según los últimos datos del 03 noviembre, 2026, el canal mantiene una actividad estable. En los últimos 30 días la variación de miembros fue de -242, y en las últimas 24 horas de -32, conservando un alto alcance.
- Estado de verificación: No verificado
- Tasa de interacción (ER): El promedio de interacción de la audiencia es 6.00%. Durante las primeras 24 horas tras publicar, el contenido suele obtener 3.06% de reacciones respecto al total de suscriptores.
- Alcance de las publicaciones: Cada publicación recibe en promedio 3 501 visualizaciones. En el primer día suele acumular 1 784 visualizaciones.
- Reacciones e interacción: La audiencia responde de forma activa: el promedio de reacciones por publicación es 18.
- Intereses temáticos: El contenido se centra en temas clave como github, claude, контекст, архитектура, api.
📝 Descripción y política de contenido
El autor describe el recurso como un espacio para expresar opiniones subjetivas:
“по всем вопросам @workakkk
@itchannels_telegram - 🔥 все ит каналы
@ai_machinelearning_big_data -ML
@ArtificialIntelligencedl -AI
@datascienceiot - 📚
@pythonlbooks
РКН: clck.ru/3Fm...”
Gracias a la alta frecuencia de actualizaciones (últimos datos recibidos el 04 noviembre, 2026), el canal mantiene la vigencia y un amplio alcance. La analítica demuestra que la audiencia interactúa activamente con el contenido, lo que lo convierte en un punto de referencia dentro de la categoría Tecnologías y Aplicaciones.
from selenium import webdriver
from selenium.webdriver.chrome.service import Service
from selenium.webdriver.chrome.options import Options
import time
opening_line = "Hi!"
number_of_swipes = 10
path = # paste your chromedriver path here
service = Service(executable_path=path)
web = 'https://tinder.com/'
options = Options()
options.add_experimental_option("debuggerAddress", "localhost:9222")
driver = webdriver.Chrome(service=service, options=options)
driver.get(web)
time.sleep(3)
for i in range(number_of_swipes):
try:
like_button = driver.find_element(by='xpath', value='//button//span[text()="Like"]')
driver.execute_script("arguments[0].click();", like_button)
time.sleep(2)
its_match_window = driver.find_element(by='xpath', value='//textarea[@placeholder="Say something nice!"]')
its_match_window.send_keys(opening_line)
time.sleep(1)
send_message_button = driver.find_element(by='xpath', value='//button/span[text()="Send"]')
send_message_button.click()
time.sleep(1)
close_its_match_window = driver.find_element(by='xpath', value='//button[@title="Back to Tinder"]')
close_its_match_window.click()
except:
try:
box = driver.find_element(by='xpath', value='//button/span[text()="Maybe Later"] | //button/span[text()="Not interested"] | //button/span[text()="No Thanks"]')
box.click()
except:
pass
▪ Video
@pythonl$ pip install yapf
Example:
x = { 'a':37,'b':42,
'c':927}
y = 'hello ''world'
z = 'hello '+'world'
a = 'hello {}'.format('world')
class foo ( object ):
def f (self ):
return 37*-+2
def g(self, x,y=42):
return y
def f ( a ) :
return 37+-+a[42-x : y**3]
reformat:
x = {'a': 37, 'b': 42, 'c': 927}
y = 'hello ' 'world'
z = 'hello ' + 'world'
a = 'hello {}'.format('world')
class foo(object):
def f(self):
return 37 * -+2
def g(self, x, y=42):
return y
def f(a):
return 37 + -+a[42 - x:y**3]
🖥 Github
@pythonldef bubble_sort(list):
for i in range(len(list)):
for j in range(len(list) - 1):
if list[j] > list[j + 1]:
list[j], list[j + 1] = list[j + 1], list[j] # swap
return list
▪Selection Sort
def selection_sort(list):
for i in range(len(list)):
min_index = i
for j in range(i + 1, len(list)):
if list[min_index] > list[j]:
min_index = j
list[i], list[min_index] = list[min_index], list[i] # swap
return list
▪Insertion Sort
def insertion_sort(list):
for i in range(1, len(list)):
key = list[i]
j = i - 1
while j >=0 and key < list[j] :
list[j+1] = list[j]
j -= 1
list[j+1] = key
return list
▪Quick Sort
def partition(array, low, high):
i = (low-1)
pivot = array[high]
for j in range(low, high):
if array[j] <= pivot:
i = i+1
array[i], array[j] = array[j], array[i]
array[i+1], array[high] = array[high], array[i+1]
return (i+1)
def quick_sort(array, low, high):
if len(array) == 1:
return array
if low < high:
partition_index = partition(array, low, high)
quick_sort(array, low, partition_index-1)
quick_sort(array, partition_index+1, high)
@pythonlpip install pywhatkit
import pywhatkit
phone_num = '+123456789'
message = 'hello'
hour = 17
minute = 25
try:
pywhatkit.sendwhatmsg(phone_num, message, hour, minute)
print(f'Message sent to {phone_num} successfully!')
except Exception as e:
print(f'Error: {str(e)}')
▪ Github
▪Docs
@pythonlimport smtplib
from email.mime.text import MIMEText
sender_email = "your_email@example.com"
recipient_email = "recipient_email@example.com"
subject = "Automated Email"
message = "This is an automated email sent using Python."
# SMTP server configuration (example: Gmail)
smtp_server = "smtp.gmail.com"
smtp_port = 587
smtp_username = "your_username"
smtp_password = "your_password"
msg = MIMEText(message)
msg["Subject"] = subject
msg["From"] = sender_email
msg["To"] = recipient_email
try:
server = smtplib.SMTP(smtp_server, smtp_port)
server.starttls()
server.login(smtp_username, smtp_password)
server.sendmail(sender_email, recipient_email, msg.as_string())
print("Email sent successfully!")
except Exception as e:
print("Error sending email:", str(e))
finally:
server.quit()
@pythonlor index, value in enumerate(["apple", "banana", "cherry"], start=1):
print(f"The index is {index} and the value is {value}")
2. zip() Up Your Lists 🤐
names = ["Batman", "Superman", "Wonder Woman"]
superpowers = ["Rich", "Strong", "Lasso of Truth"]
for hero, power in zip(names, superpowers):
print(f"{hero} is really just super {power}!")
3. collections.Counter() — The Crowd Tamer 📊
from collections import Counter
party_list = ["Alice", "Bob", "Alice", "Eve", "Bob", "Eve", "Alice"]
print(Counter(party_list))
# Output: Counter({'Alice': 3, 'Bob': 2, 'Eve': 2})
4. functools.lru_cache() — The Time Traveler ⏱
from functools import lru_cache
@lru_cache
def fib(n):
if n < 2:
return n
return fib(n-1) + fib(n-2)
5. All Aboard the any() and all() Express 🚂
friends_going = [False, False, True, False]
print(any(friends_going)) # Output: True
chores_done = [True, True, True, True]
print(all(chores_done)) # Output: True
6. Get Slick with itertools.chain() 🚲
from itertools import chain
list1 = [1, 2, 3]
list2 = ['a', 'b', 'c']
combined = list(chain(list1, list2))
print(combined) # Output: [1, 2, 3, 'a', 'b', 'c']
7. The Great defaultdict() Magician 🎩
from collections import defaultdict
d = defaultdict(int)
print(d["new_key"]) # Output: 0, and "new_key" is now a key in the dict
8. Jazz Up with reversed() 🔄
original_list = [1, 2, 3, 4, 5]
for item in reversed(original_list):
print(item, end=' ') # Output: 5 4 3 2 1
9. Don’t Get Lost, Use pathlib.Path() 🗺
from pathlib import Path
# Navigate to your home directory and create a file there.
home = Path.home()
file = home / "treasure_map.txt"
file.touch()
print(f"Your treasure map is located at: {file}")
10. The Underestimated else in Loops 🎢
for i in range(5):
if i == 10:
break
else:
print("Loop completed without a 'break'. Batman approves.")
Disclaimers 📢:
📌Будьте осторожны при использовании таких функций, как itertools.chain() и collections.Counter() на больших наборах данных. Они могут потреблять больше памяти, чем слон на шведском столе. 🐘
📌Не злоупотребляйте функцией functools.lru_cache(). Это как машина времени - слишком много возиться с ней может привести к нежелательным последствиям.
📌Хотя defaultdict() - волшебная функция, убедитесь, что вы действительно хотите добавить новый ключ в свой dict, иначе словарь может бесконтрольно расти,import redis
# Connect to Redis
r = redis.Redis(host='localhost', port=6379, db=0)
def get_data_from_cache(key):
# Check if data exists in the cache
if r.exists(key):
# Retrieve data from the cache
data = r.get(key)
return data.decode('utf-8') # Convert bytes to string
else:
# Fetch data from the primary data source
data = fetch_data_from_source()
# Store data in the cache with a timeout of 1 hour
r.setex(key, 3600, data)
return data
2. Pub/Sub (Publish/Subscribe):
Redis поддерживает паттерн pub/sub, позволяя вам создавать системы обмена сообщениями. Вот пример:
import redis
import time
# Connect to Redis
r = redis.Redis(host='localhost', port=6379, db=0)
def publish_message(channel, message):
# Publish a message to the specified channel
r.publish(channel, message)
def subscribe_channel(channel):
# Subscribe to a channel and process incoming messages
pubsub = r.pubsub()
pubsub.subscribe(channel)
for message in pubsub.listen():
print(message['data'].decode('utf-8')) # Process the received message
3. Rate Limiting:
Redis можно использовать для реализации ограничения скорости, чтобы контролировать количество запросов или операций за период времени. Пример:
import redis
# Connect to Redis
r = redis.Redis(host='localhost', port=6379, db=0)
def check_rate_limit(ip_address):
# Increment the request count for the IP address
request_count = r.incr(ip_address)
# If the count exceeds the limit (e.g., 100 requests per minute), deny the request
if request_count > 100:
return False
return True
4. Session Storage:
Redis можно использовать для хранения данных сеанса в веб-приложениях. Пример:
import redis
import uuid
# Connect to Redis
r = redis.Redis(host='localhost', port=6379, db=0)
def create_session(user_id):
# Generate a unique session ID
session_id = str(uuid.uuid4())
# Store the session data in Redis with a timeout of 30 minutes
r.setex(session_id, 1800, user_id)
return session_id
def get_user_id_from_session(session_id):
# Retrieve the user ID from the session data in Redis
user_id = r.get(session_id)
if user_id is not None:
return user_id.decode('utf-8') # Convert bytes to string
else:
return None
5. Leaderboard:
Redis можно использовать для создания таблиц лидеров или рейтингов на основе набранных баллов. Пример:
import redis
# Connect to Redis
r = redis.Redis(host='localhost', port=6379, db=0)
def update_score(player_id, score):
# Update the score of a player
r.zadd('leaderboard', {player_id: score})
def get_leaderboard():
# Get the top 10 players from the leaderboard
leaderboard = r.zrevrange('leaderboard', 0, 9, withscores=True)
for player, score in leaderboard:
print(f"Player: {player.decode('utf-8')}, Score: {score}")
Это лишь несколько примеров того, как Redis можно использовать в Python. Redis предоставляет множество других мощных функций и структур данных, которые можно использовать в различных приложениях.
▪Github
@data_analysis_mlpip install django-debug-toolbar
2. Django Rest Framework
Этот комплексный пакет упрощает создание RESTful API, предоставляя надежные инструменты для сериализации, аутентификации и тд.
pip install djangorestframework
3. Celery
Это распределенная асинхронная очередь заданий, которая обладает широким функционалом. В нашем конструкторе сайтов нам часто приходиться запускать асинхронные с точки зрения ответа пользователю задачи.
pip install celery
4. Django-Crispy-Forms
Этот удобный инструмент упрощает процесс рендеринга и стилизации форм.
pip install django-crispy-forms
5. Django-Cache
Этот пакет позволяет хранить часто используемые данные в памяти, уменьшая количество повторяющихся запросов к базе данных.
pip install django-cache
6. Django Allauth
Этот пакет предлагает комплексные функции регистрации пользователей, входа в систему и управления учетными записями.
pip install django-allauth
10. Django Guardian
Этот пакет позволяет вам управлять разрешениями на уровне объектов, позволяя определять контроль доступа для отдельных экземпляров моделей.
pip install django-guardian
11. Django Storages
Этот пакет интегрируется с популярными провайдерами облачных хранилищ, такими как Amazon S3 и Google Cloud Storage.
pip install django-storages
12. Django Compressor
Этот пакет автоматически объединяет и сжимает файлы CSS и JavaScript, уменьшая количество HTTP-запросов и улучшая время загрузки страниц.
pip install django-compressor
13. Django Haystack
Этот пакет интегрирует различные поисковые системы, такие как Elasticsearch и Solr, позволяя вам создать надежные поисковые возможности для вашего приложения.
pip install django-haystack
@pythonldef quick_sort(data: list) -> list:
if len(data) <= 1:
return data
else:
return [
*quick_sort([e for e in data[1:] if e <= data[0]]),
data[0],
*quick_sort([e for e in data[1:] if e > data[0]]),
]
if __name__ == "__main__":
import doctest
doctest.testmod()
@pythonl$ pip install lark --upgrade
from lark import Lark
l = Lark('''start: WORD "," WORD "!"
%import common.WORD // imports from terminal library
%ignore " " // Disregard spaces in text
''')
print( l.parse("Hello, World!") )
Tree(start, [Token(WORD, 'Hello'), Token(WORD, 'World')])
▪Github
@pythonl