[PYTHON:TODAY]
Python скрипты, нейросети, боты, автоматизация. Всё бесплатно! Приват: https://boosty.to/pythontoday YouTube: https://clck.ru/3LfJhM Канал админа: @akagodlike Чат: @python2day_chat Сотрудничество: @web_runner Канал в РКН: https://clck.ru/3GBFVm
Show more📈 Analytical overview of Telegram channel [PYTHON:TODAY]
Channel [PYTHON:TODAY] (@python2day) in the Russian language segment is an active participant. Currently, the community unites 63 455 subscribers, ranking 2 045 in the Technologies & Applications category and 9 394 in the Russia region.
📊 Audience metrics and dynamics
Since its creation on невідомо, the project has demonstrated rapid growth, gathering an audience of 63 455 subscribers.
According to the latest data from 30 October, 2026, the channel demonstrates stable activity. Although there has been a change in the number of participants by -290 over the last 30 days and by -12 over the last 24 hours, overall reach remains high.
- Verification status: Not verified
- Engagement rate (ER): The average audience engagement rate is 14.05%. Within the first 24 hours after publication, content typically collects 7.52% reactions from the total number of subscribers.
- Post reach: On average, each post receives 8 917 views. Within the first day, a publication typically gains 4 771 views.
- Reactions and interaction: The audience actively supports content: the average number of reactions per post is 60.
- Thematic interests: Content is focused on key topics such as github, soft, install, pip, docker.
📝 Description and content policy
The author describes the resource as a platform for expressing subjective opinions:
“Python скрипты, нейросети, боты, автоматизация. Всё бесплатно!
Приват: https://boosty.to/pythontoday
YouTube: https://clck.ru/3LfJhM
Канал админа: @akagodlike
Чат: @python2day_chat
Сотрудничество: @web_runner
Канал в РКН: https://clck.ru/3GBFVm”
Thanks to the high frequency of updates (latest data received on 31 October, 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.
pip install translate
👨💻 Пример использования:
from translate import Translator
def translate_text(text: str, source_lang: str, target_lang: str) -> str:
"""
Переводит текст с одного языка на другой.
:param text: Текст для перевода.
:param source_lang: Язык оригинала (например, "Russian").
:param target_lang: Язык перевода (например, "English").
:return: Переведённый текст.
"""
translator = Translator(from_lang=source_lang, to_lang=target_lang)
return translator.translate(text)
# Пример использования
if __name__ == "__main__":
result = translate_text("Привет мой друг", "Russian", "English")
print(result)
# Hello my friend
Сохраняй, пригодится для практики 👍
#python #code #tipsandtricksjson.dump(obj, fp, ...) — сериализует obj сразу в файл/поток (fp), возвращает None.
* json.dumps(obj, ...) — сериализует в строку (удобно отправлять по сети/логировать).
* json.load(fp, ...) — читает из файла/потока и возвращает Python‑объект.
* json.loads(s, ...) — парсит из строки и возвращает Python‑объект.
Сохранение JSON (и разница dump/dumps)
import json
data = {
"name": "John",
"salary": 1499.9,
"is_real": False,
"titles": ["The Unknown", "Anonymous"]
}
# dump: сразу в файл
with open("data1.json", "w", encoding="utf-8") as f:
json.dump(data, f, indent=2) # возвращает None
# dumps: получаем строку (например, чтобы отправить в API)
payload = json.dumps(data, indent=2)
print(type(payload)) # <class 'str'>
# ensure_ascii: как сохранить не-ASCII символы без \uXXXX
По умолчанию JSON экранирует всё не-ASCII:
ru = {"first_name": "Алиса", "city": "München"}
print(json.dumps(ru))
# {"first_name": "\u0410\u043b\u0438\u0441\u0430", "city": "M\u00fcnchen"}
print(json.dumps(ru, ensure_ascii=False))
# {"first_name": "Алиса", "city": "München"}
В файл — обязательно с кодировкой:
with open("ru.json", "w", encoding="utf-8") as f:
json.dump(ru, f, ensure_ascii=False, indent=2)
> ensure_ascii работает и в dump, и в dumps. Для чтения (load/loads) не нужен.
Полезные опции:
* indent=2 — красиво форматирует.
* separators=(",", ":") — компактный вывод (без пробелов).
* sort_keys=True — ключи по алфавиту (удобно для диффов).
Загрузка JSON (и разница load/loads)
import json
# load: из файла
with open("data1.json", "r", encoding="utf-8") as f:
obj = json.load(f)
# loads: из строки
s = '{"ok": true, "n": 3}'
obj2 = json.loads(s)
Мини‑обработка ошибок:
try:
json.loads('{"broken": }')
except json.JSONDecodeError as e:
print(f"Ошибка в строке {e.lineno}, столбце {e.colno}: {e.msg}")
Маленькая практика: забрали данные и сохранили красиво
import json, requests
users = requests.get("https://jsonplaceholder.typicode.com/users").json()
# всё в один файл
with open("users.json", "w", encoding="utf-8") as f:
json.dump(users, f, indent=2, ensure_ascii=False)
# каждый пользователь — в отдельный файл
for u in users:
with open(f"user_{u['id']}.json", "w", encoding="utf-8") as f:
json.dump(u, f, indent=2, ensure_ascii=False)
Важно помнить
* datetime, Decimal, свои классы — не сериализуются “из коробки”. Нужен default= или предварительная конвертация.
* Числа с плавающей точкой — это float (осторожно с точностью, если нужны деньги — храните как строки/копейки).
JSON — это must-have навык для любого Python-разработчика: от парсинга и API-запросов до конфигураций и хранения данных.
👍 Сохраняй шпаргалку, пригодится!
#doc #python #cheatsheetgit clone https://github.com/spipm/Depixelization_poc.git
cd Depixelization_poc
⌨️ Как пользоваться:
Запусти скрипт и укажи путь к своему пикселизированному изображению:
python3 depix.py -p [ПУТЬ_К_ИЗОБРАЖЕНИЮ] -s images/searchimages/[ТВОЕ_ИЗОБРАЖЕНИЕ].png
Хочешь визуально убедиться, как Depix определяет пиксельные блоки? Воспользуйся вспомогательным инструментом:
python3 tool_show_boxes.py -p [ПУТЬ_К_ИЗОБРАЖЕНИЮ] -s images/searchimages/[ТВОЕ_ИЗОБРАЖЕНИЕ].png
💻 Хочешь по-настоящему скрыть текст?
Используй размытие или заштриховывай вручную — иначе Depix придёт за тобой 😎
♎️ GitHub/Инструкция
#soft #github #python