Python RU
Все для python разработчиков админ - @haarrp @python_job_interview - Python собеседования @ai_machinelearning_big_data - машинное обучение @itchannels_telegram - 🔥лучшие ит-каналы @programming_books_it - it книги @pythonl РКН: clck.ru/3Fmy2j
Show more📈 Analytical overview of Telegram channel Python RU
Channel Python RU (@pro_python_code) in the Russian language segment is an active participant. Currently, the community unites 12 326 subscribers, ranking 10 166 in the Technologies & Applications category and 52 207 in the Russia region.
📊 Audience metrics and dynamics
Since its creation on невідомо, the project has demonstrated rapid growth, gathering an audience of 12 326 subscribers.
According to the latest data from 03 November, 2026, the channel demonstrates stable activity. Although there has been a change in the number of participants by -16 over the last 30 days and by -3 over the last 24 hours, overall reach remains high.
- Verification status: Not verified
- Engagement rate (ER): The average audience engagement rate is 7.59%. Within the first 24 hours after publication, content typically collects 3.08% reactions from the total number of subscribers.
- Post reach: On average, each post receives 935 views. Within the first day, a publication typically gains 379 views.
- Reactions and interaction: The audience actively supports content: the average number of reactions per post is 5.
- Thematic interests: Content is focused on key topics such as api, docker, github, sql, linux.
📝 Description and content policy
The author describes the resource as a platform for expressing subjective opinions:
“Все для python разработчиков
админ - @haarrp
@python_job_interview - Python собеседования
@ai_machinelearning_big_data - машинное обучение
@itchannels_telegram - 🔥лучшие ит-каналы
@programming_books_it - it книги
@pythonl
РКН: clck.ru/3Fmy2j”
Thanks to the high frequency of updates (latest data received on 04 November, 2026), the channel maintains relevance and a high level of publication reach. Analytics show that the audience actively interacts with content, making it an important point of influence in the Technologies & Applications category.
$ git clone https://github.com/thanhminh6996/CompressedCrack.git
$ cd ./CompressedCrack
Использование:
Нас интересует скрипт crack.py который принимает несколько параметров:
$ python crack.py -i file_name min_character max_character characters
🌵 -i file_name : путь до архива.
🌵 min_character: минимальное количество символов в пароле.
🌵 max_character: максимальное количество символов в пароле.
🌵 characters: используемые в пароле символы по которым будет осуществляться перебор, 123qwerty!@$ и т.д.
$ python crack.py -i file.zip 1 5 1234567890
⚙️ GitHub/Инструкция
@pro_python_codedef singleton(cls):
# храним все разные синглтоны с одном словаре (класс -> экземпляр)
instances = {}
def getinstance():
# если класса нет среди ключей нашего словаря - создадим экземпляр
if cls not in instances:
instances[cls] = cls()
# вернем ссылку на него
return instances[cls]
return getinstance
Вот так мы помечаем, что класс MySingleton – синглтон:
@singleton
class MySingleton:
def __init__(self):
self.x = 10
print("__init__")
📎 Пример (проверяем единственность экземляра):
>>> x1 = MySingleton()
init
>>> x2 = MySingleton()
>>> x1 is x2
True
>>> x1.x = 100
>>> x2.x
100
• init было вызвано единажды
• Обе переменные указывают на один экземпляр
• При изменении полей в одном экземпляре, они меняются и во втором.
Плохо то, что MySingleton здесь – это функция (результат работы декоратора), а не класс: вы не можете вызывать класс-методы у нее. Эта проблема решается использованием метаклассов.
# обратите внимание, метакласс наследован от type
class Singleton(type):
_instances = {}
def __call__(cls, *args, **kwargs):
if cls not in cls._instances:
cls._instances[cls] = super(Singleton, cls).__call__(*args, **kwargs)
return cls._instances[cls]
Применение (Python 3):
class MySingleton(metaclass=Singleton):
def __init__(self):
self.x = 10
print("__init__")
⚠️ Не злоупотребляйте синглтонами, они осложняют тестирование кода.d = {"a": 2, "b": 3, "c": 2}
f = lambda: zip(d.values(), d.keys())
max_ = max(f())
min_ = min(f())
print(max_, min_)>>> import timeit
>>> timeit.timeit('"-".join(str(n) for n in range(100))', number=10000)
0.23387694358825684
>>> timeit.timeit('"-".join([str(n) for n in range(100)])', number=10000)
0.20793890953063965
>>> timeit.timeit('"-".join(map(str, range(100)))', number=10000)
0.2012779712677002
Оказалось, что третий.
Если в тестируемом кусочке кода вам потребуется обратиться к переменным или модулям из глобальной зоны видимости, то удобно воспользоваться параметром globals и присвоить его результаты функции globals().
>>> import math
>>> my_const = 6.28
>>> timeit.timeit('math.cos(my_const)', globals=globals())
0.12635547306854278
Можно также передавать в timeit имя функции (без параметров):
>>> import timeit >>> def foo(): "-".join(map(str, range(1000))) ... >>> timeit.timeit(foo, number=1000)📎 timeit можно вызвать из терминала:
python -m timeit -s "from math import sqrt" -n 10000 "x = sqrt(25)"После ключа -s идет строка инициализации; она выполнится единожды. Ключ -n установит число итераций теста (рекомендуется не меньше 1000). ⚠️ Помните, что результаты тестов могут отличаться в зависимости от вашего компьютера, ОС, версии Python, фаз луны и много еще чего. Также советуем вам не увлекаться чрезмерной оптимизацией во вред читаемости кода. Желаем вам продуктивного программирования!
