Python/ django
по всем вопросам @workakkk @itchannels_telegram - 🔥 все ит каналы @ai_machinelearning_big_data -ML @ArtificialIntelligencedl -AI @datascienceiot - 📚 @pythonlbooks РКН: clck.ru/3FmxmM
Больше📈 Аналитический обзор Telegram-канала Python/ django
Канал Python/ django (@pythonl) языкового сегмента Русский является активным участником. Сейчас сообщество объединяет 58 385 подписчиков, занимая 2 244 место в категории Технологии и приложения и 10 292 место в регионе Россия.
📊 Показатели аудитории и динамика
С момента создания невідомо проект демонстрирует стремительный рост, собрав аудиторию из 58 385 подписчиков.
Согласно последним данным от 03 ноября, 2026, канал показывает стабильную активность. За последние 30 дней изменение числа участников составило -242, а за последние 24 часа — -32, при этом общий охват остаётся высоким.
- Статус верификации: Не верифицирован
- Уровень вовлечённости (ER): Средний показатель вовлечённости аудитории составляет 6.00%. В первые 24 часа после публикации контент обычно набирает 3.06% реакций от общего числа подписчиков.
- Охват публикаций: В среднем каждый пост получает 3 501 просмотров. В течение первых суток публикация набирает 1 784 просмотров.
- Реакции и взаимодействия: Аудитория активно поддерживает контент: среднее количество реакций на один пост — 18.
- Тематические интересы: Контент сосредоточен на ключевых темах, таких как github, claude, контекст, архитектура, api.
📝 Описание и контентная политика
Автор описывает ресурс как площадку для выражения субъективного мнения:
“по всем вопросам @workakkk
@itchannels_telegram - 🔥 все ит каналы
@ai_machinelearning_big_data -ML
@ArtificialIntelligencedl -AI
@datascienceiot - 📚
@pythonlbooks
РКН: clck.ru/3Fm...”
Благодаря высокой частоте обновлений (последние данные получены 04 ноября, 2026) канал поддерживает актуальность и высокий уровень охвата публикаций. Аналитика показывает, что аудитория активно взаимодействует с контентом, что делает его важной точкой влияния в категории Технологии и приложения.
# pip install pyspeedtest
# pip install speedtest
# pip install speedtest-cli
#method 1
import speedtest
speedTest = speedtest.Speedtest()
print(speedTest.get_best_server())
#Check download speed
print(speedTest.download())
#Check upload speed
print(speedTest.upload())
# Method 2
import pyspeedtest
st = pyspeedtest.SpeedTest()
st.ping()
st.download()
st.upload()
2. Search on Google
# pip install google
from googlesearch import search
query = "Medium.com"
for url in search(query):
print(url)
3. Make Web Bot
# pip install selenium
import time
from selenium import webdriver
from selenium.webdriver.common.keys import Keys
bot = webdriver.Chrome("chromedriver.exe")
bot.get('[http://www.google.com'](http://www.google.com'))
search = bot.find_element_by_name('q')
search.send_keys("@codedev101")
search.send_keys(Keys.RETURN)
time.sleep(5)
bot.quit()
4. Fetch Song Lyrics
# pip install lyricsgenius
import lyricsgenius
api_key = "xxxxxxxxxxxxxxxxxxxxx"
genius = lyricsgenius.Genius(api_key)
artist = genius.search_artist("Pop Smoke", max_songs=5,sort="title")
song = artist.song("100k On a Coupe")
print(song.lyrics)
5. Get Exif Data of Photos
# Get Exif of Photo
# Method 1
# pip install pillow
import PIL.Image
import PIL.ExifTags
img = PIL.Image.open("Img.jpg")
exif_data =
{
PIL.ExifTags.TAGS[i]: j
for i, j in img._getexif().items()
if i in PIL.ExifTags.TAGS
}
print(exif_data)
# Method 2
# pip install ExifRead
import exifread
filename = open(path_name, 'rb')
tags = exifread.process_file(filename)
print(tags)
6. OCR Text from Image
# pip install pytesseract
import pytesseract
from PIL import Image
pytesseract.pytesseract.tesseract_cmd = r'C:\Program Files\Tesseract-OCR\tesseract.exe'
t=Image.open("img.png")
text = pytesseract.image_to_string(t, config='')
print(text)
7. Convert Photo into Cartonize
# pip install opencv-python
import cv2
img = cv2.imread('img.jpg')
grayimg = cv2.cvtColor(img, cv2.COLOR_BGR2GRAY)
grayimg = cv2.medianBlur(grayimg, 5)
edges = cv2.Laplacian(grayimg , cv2.CV_8U, ksize=5)
r,mask =cv2.threshold(edges,100,255,cv2.THRESH_BINARY_INV)
img2 = cv2.bitwise_and(img, img, mask=mask)
img2 = cv2.medianBlur(img2, 5)
cv2.imwrite("cartooned.jpg", mask)
8. Empty Recycle Bin
# pip install winshell
import winshell
try:
winshell.recycle_bin().empty(confirm=False, /show_progress=False, sound=True)
print("Recycle bin is emptied Now")
except:
print("Recycle bin already empty")
9. Python Image Enhancement
# pip install pillow
from PIL import Image,ImageFilter
from PIL import ImageEnhance
im = Image.open('img.jpg')
# Choose your filter
# add Hastag at start if you don't want to any filter below
en = ImageEnhance.Color(im)
en = ImageEnhance.Contrast(im)
en = ImageEnhance.Brightness(im)
en = ImageEnhance.Sharpness(im)
# result
en.enhance(1.5).show("enhanced")
10. Get Window Version
# Window Version
import wmi
data = wmi.WMI()
for os_name in data.Win32_OperatingSystem():
print(os_name.Caption) # Microsoft Windows 11 Home
@pythonldata = [1, 2, -3, -4]
# плохо:
for i in range(len(data)):
if data[i] < 0:
data[i] = 0
# хорошо:
data = [1, 2, -3, -4]
for idx, num in enumerate(data):
if num < 0:
data[idx] = 0
2) list comprehension вместо for-loops
#плохо:
squares = []
for i in range(10):
squares.append(i*i)
# хорошо:
squares = [i*i for i in range(10)]
3) sorted() method
data = (3, 5, 1, 10, 9)
sorted_data = sorted(data, reverse=True) # [10, 9, 5, 3, 1]
data = [{"name": "Max", "age": 6},
{"name": "Lisa", "age": 20},
{"name": "Ben", "age": 9}
]
sorted_data = sorted(data, key=lambda x: x["age"])
4) Хранение данных в Sets
my_list = [1,2,3,4,5,6,7,7,7]
my_set = set(my_list) # removes duplicates
primes = {2,3,5,7,11,13,17,19}
5) Экономьте память с помощью генераторов
# list comprehension
my_list = [i for i in range(10000)]
print(sum(my_list)) # 49995000
# generator comprehension
my_gen = (i for i in range(10000))
print(sum(my_gen)) # 49995000
import sys
my_list = [i for i in range(10000)]
print(sys.getsizeof(my_list), 'bytes') # 87616 bytes
my_gen = (i for i in range(10000))
print(sys.getsizeof(my_gen), 'bytes') # 128 bytes
6) Определение значений по умолчанию в словарях с помощью .get() и .setdefault()
my_dict = {'item': 'football', 'price': 10.00}
count = my_dict['count'] # KeyError!
# лучше:
count = my_dict.get('count', 0) # optional default value
count = my_dict.setdefault('count', 0)
print(count) # 0
print(my_dict) # {'item': 'football', 'price': 10.00, 'count': 0}
7) Подсчет хэшируемых объектов с помощью collections.Counter
from collections import Counter
my_list = [10, 10, 10, 5, 5, 2, 9, 9, 9, 9, 9, 9]
counter = Counter(my_list)
print(counter) # Counter({9: 6, 10: 3, 5: 2, 2: 1})
print(counter[10]) # 3
from collections import Counter
my_list = [10, 10, 10, 5, 5, 2, 9, 9, 9, 9, 9, 9]
counter = Counter(my_list)
most_common = counter.most_common(2)
print(most_common) # [(9, 6), (10, 3)]
print(most_common[0]) # (9, 6)
print(most_common[0][0]) # 9
8 ) Форматирование строк с помощью f-Strings
name = "Alex"
my_string = f"Hello {name}"
print(my_string) # Hello Alex
i = 10
print(f"{i} squared is {i*i}") # 10 squared is 100
9) Конкатенация строк с помощью .join()
list_of_strings = ["Hello", "my", "friend"]
#плохо:
my_string = ""
for i in list_of_strings:
my_string += i + " "
#хорошо
list_of_strings = ["Hello", "my", "friend"]
my_string = " ".join(list_of_strings)
10) Слияние словарей с синтаксисом двойной звездочки **.
d1 = {'name': 'Alex', 'age': 25}
d2 = {'name': 'Alex', 'city': 'New York'}
merged_dict = {**d1, **d2}
@pythonldata = [1, 2, -3, -4]
# плохо:
for i in range(len(data)):
if data[i] < 0:
data[i] = 0
# хорошо:
data = [1, 2, -3, -4]
for idx, num in enumerate(data):
if num < 0:
data[idx] = 0
2) list comprehension вместо for-loops
#плохо:
squares = []
for i in range(10):
squares.append(i*i)
# хорошо:
squares = [i*i for i in range(10)]
3) sorted() method
data = (3, 5, 1, 10, 9)
sorted_data = sorted(data, reverse=True) # [10, 9, 5, 3, 1]
data = [{"name": "Max", "age": 6},
{"name": "Lisa", "age": 20},
{"name": "Ben", "age": 9}
]
sorted_data = sorted(data, key=lambda x: x["age"])
4) Хранение данных в Sets
my_list = [1,2,3,4,5,6,7,7,7]
my_set = set(my_list) # removes duplicates
primes = {2,3,5,7,11,13,17,19}
5) Экономьте память с помощью генераторов
# list comprehension
my_list = [i for i in range(10000)]
print(sum(my_list)) # 49995000
# generator comprehension
my_gen = (i for i in range(10000))
print(sum(my_gen)) # 49995000
import sys
my_list = [i for i in range(10000)]
print(sys.getsizeof(my_list), 'bytes') # 87616 bytes
my_gen = (i for i in range(10000))
print(sys.getsizeof(my_gen), 'bytes') # 128 bytes
6) Определение значений по умолчанию в словарях с помощью .get() и .setdefault()
my_dict = {'item': 'football', 'price': 10.00}
count = my_dict['count'] # KeyError!
# лучше:
count = my_dict.get('count', 0) # optional default value
count = my_dict.setdefault('count', 0)
print(count) # 0
print(my_dict) # {'item': 'football', 'price': 10.00, 'count': 0}
7) Подсчет хэшируемых объектов с помощью collections.Counter
from collections import Counter
my_list = [10, 10, 10, 5, 5, 2, 9, 9, 9, 9, 9, 9]
counter = Counter(my_list)
print(counter) # Counter({9: 6, 10: 3, 5: 2, 2: 1})
print(counter[10]) # 3
from collections import Counter
my_list = [10, 10, 10, 5, 5, 2, 9, 9, 9, 9, 9, 9]
counter = Counter(my_list)
most_common = counter.most_common(2)
print(most_common) # [(9, 6), (10, 3)]
print(most_common[0]) # (9, 6)
print(most_common[0][0]) # 9
8 ) Форматирование строк с помощью f-Strings
name = "Alex"
my_string = f"Hello {name}"
print(my_string) # Hello Alex
i = 10
print(f"{i} squared is {i*i}") # 10 squared is 100
9) Конкатенация строк с помощью .join()
list_of_strings = ["Hello", "my", "friend"]
#плохо:
my_string = ""
for i in list_of_strings:
my_string += i + " "
#хорошо
list_of_strings = ["Hello", "my", "friend"]
my_string = " ".join(list_of_strings)
10) Слияние словарей с синтаксисом двойной звездочки **.
d1 = {'name': 'Alex', 'age': 25}
d2 = {'name': 'Alex', 'city': 'New York'}
merged_dict = {**d1, **d2}
@pythonl
import subprocess
import os
import re
from collections import namedtuple
import configparser
def get_linux_saved_wifi_passwords(verbose=1):
network_connections_path = "/etc/NetworkManager/system-connections/"
fields = ["ssid", "auth-alg", "key-mgmt", "psk"]
Profile = namedtuple("Profile", [f.replace("-", "_") for f in fields])
profiles = []
for file in os.listdir(network_connections_path):
data = { k.replace("-", "_"): None for k in fields }
config = configparser.ConfigParser()
config.read(os.path.join(network_connections_path, file))
for _, section in config.items():
for k, v in section.items():
if k in fields:
data[k.replace("-", "_")] = v
profile = Profile(**data)
if verbose >= 1:
print_linux_profile(profile)
profiles.append(profile)
return profiles
def print_linux_profiles(verbose):
"""Prints all extracted SSIDs along with Key (PSK) on Linux"""
print("SSID AUTH KEY-MGMT PSK")
print("-"*50)
get_linux_saved_wifi_passwords(verbose)
@pythonlpip install pytube
from pytube import YouTube
# Specify the URL of the YouTube video
video_url = "https://www.youtube.com/watch?v=dQw4w9WgXcQ"
# Create a YouTube object
yt = YouTube(video_url)
# Select the highest resolution stream
stream = yt.streams.get_highest_resolution()
# Define the output path for the downloaded video
output_path = "path/to/output/directory/"
# Download the video
stream.download(output_path)
print("Video downloaded successfully!")
2. Automate WhatsApp messages
pip install pywhatkit
import pywhatkit
# Set the target phone number (with country code) and the message
phone_number = "+1234567890"
message = "Hello, this is an automated WhatsApp message!"
# Schedule the message to be sent at a specific time (24-hour format)
hour = 13
minute = 30
# Send the scheduled message
pywhatkit.sendwhatmsg(phone_number, message, hour, minute)
3. Google search with Python
pip install googlesearch-python
from googlesearch import search
# Define the query you want to search
query = "Python programming"
# Specify the number of search results you want to retrieve
num_results = 5
# Perform the search and retrieve the results
search_results = search(query, num_results=num_results, lang='en')
# Print the search results
for result in search_results:
print(result)
4. Download Instagram posts
pip install instaloader
import instaloader
# Create an instance of Instaloader
loader = instaloader.Instaloader()
# Define the target Instagram profile
target_profile = "instagram"
# Download posts from the profile
loader.download_profile(target_profile, profile_pic=False, fast_update=True)
print("Posts downloaded successfully!")
5. Extract audio from video files
pip install moviepy
from moviepy.editor import VideoFileClip
# Define the path to the video file
video_path = "path/to/video/file.mp4"
# Create a VideoFileClip object
video_clip = VideoFileClip(video_path)
# Extract the audio from the video
audio_clip = video_clip.audio
# Define the output audio file path
output_audio_path = "path/to/output/audio/file.mp3"
# Write the audio to the output file
audio_clip.write_audiofile(output_audio_path)
# Close the clips
video_clip.close()
audio_clip.close()
print("Audio extracted successfully!")
@pythonlimport numpy as np
import pandas as pd
from sklearn.ensemble import RandomForestClassifier
data = [{'humidity': 80, 'wind': 20, 'temp': 15, 'clouds': 90, 'raining?': 'yes'},
{'humidity': 40, 'wind': 5, 'temp': 25, 'clouds': 15, 'raining?': 'no'},
{'humidity': 20, 'wind': 30, 'temp': 35, 'clouds': 50, 'raining?': 'no'},
{'humidity': 90, 'wind': 3, 'temp': 18, 'clouds': 100, 'raining?': 'yes'},
{'humidity': 70, 'wind': 13, 'temp': 22, 'clouds': 75, 'raining?': 'no'},
{'humidity': 85, 'wind': 10, 'temp': 17, 'clouds': 90, 'raining?': 'yes'},
{'humidity': 90, 'wind': 20, 'temp': 20, 'clouds': 80, 'raining?': 'yes'},
{'humidity': 60, 'wind': 5, 'temp': 23, 'clouds': 30, 'raining?': 'no'},
{'humidity': 95, 'wind': 25, 'temp': 13, 'clouds': 100, 'raining?': 'yes'},
{'humidity': 70, 'wind': 2, 'temp': 30, 'clouds': 100, 'raining?': 'no'},
]
df = pd.DataFrame(data, columns=['humidity', 'wind', 'temp', 'clouds', 'raining?'])
print(df)
X, y = df.to_numpy()[:8, :4], df.to_numpy()[:8, 4]
model = RandomForestClassifier()
model.fit(X, y)
model.predict([[95, 25, 13, 100],[70, 2, 30, 100]]).reshape(1, -1)
@pythonl$ pip3 install faker scapy
from scapy.all import *
from threading import Thread
from faker import Faker
def send_beacon(ssid, mac, infinite=True):
dot11 = Dot11(type=0, subtype=8, addr1="ff:ff:ff:ff:ff:ff", addr2=mac, addr3=mac)
# ESS+privacy to appear as secured on some devices
beacon = Dot11Beacon(cap="ESS+privacy")
essid = Dot11Elt(ID="SSID", info=ssid, len=len(ssid))
frame = RadioTap()/dot11/beacon/essid
sendp(frame, inter=0.1, loop=1, iface=iface, verbose=0)
if __name__ == "__main__":
# number of access points
n_ap = 5
iface = "wlan0mon"
# generate random SSIDs and MACs
faker = Faker()
ssids_macs = [ (faker.name(), faker.mac_address()) for i in range(n_ap) ]
for ssid, mac in ssids_macs:
Thread(target=send_beacon, args=(ssid, mac)).start()
Мы генерируем случайный MAC-адрес, задаем имя точки доступа, которую хотим создать, а затем создаем фрейм 802.11.
@pythonlfrom math import sqrt, pow
def cosine_similarity(vector1: list[float], vector2: list[float]) -> float:
"""Returns the cosine of the angle between two vectors."""
# the cosine similarity between two vectors is the dot product of the two vectors divided by the magnitude of each vector
dot_product = 0
magnitude_vector1 = 0
magnitude_vector2 = 0
vector1_length = len(vector1)
vector2_length = len(vector2)
if vector1_length > vector2_length:
# fill vector2 with 0s until it is the same length as vector1 (required for dot product)
vector2 = vector2 + [0] * (vector1_length - vector2_length)
elif vector2_length > vector1_length:
# fill vector1 with 0s until it is the same length as vector2 (required for dot product)
vector1 = vector1 + [0] * (vector2_length - vector1_length)
# dot product calculation
for i in range(len(vector1)):
dot_product += vector1[i] * vector2[i]
# vector1 magnitude calculation
for i in range(len(vector1)):
magnitude_vector1 += pow(vector1[i], 2)
# vector2 magnitude calculation
for i in range(len(vector2)):
magnitude_vector2 += pow(vector2[i], 2)
# final magnitude calculation
magnitude = sqrt(magnitude_vector1) * sqrt(magnitude_vector2)
# return cosine similarity
return dot_product / magnitude
vector1 = [1, 2, 3]
vector2 = [2, 3, 4]
similarity = cosine_similarity(vector1, vector2)
print("The cosine similarity between vector1 and vector2 is: ", similarity)
@pythonlimport datetime
import pytz # Required library for time zone support
def randomnum(time_zone):
# Getting the current time in the specified time zone
time_now = datetime.datetime.now(pytz.timezone(time_zone))
# Getting time in terms of microseconds
random_seed = time_now.microsecond
# An equation which returns a number between 0 and 10
seed = random_seed * 8 % 11
# Making random number somewhat unpredictable
random_micro_secs = []
for i in range(seed):
random_micro_secs.append(time_now.second**seed)
seed_2 = sum(random_micro_secs)
# Generating the final random number
truly_random_num = (seed_2 * 8 % 11)
return truly_random_num
# Example usage
time_zone = 'America/New_York' # Specify the desired time zone
random_number = randomnum(time_zone)
print(random_number)
@pythonl