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 332 subscribers, ranking 10 183 in the Technologies & Applications category and 52 330 in the Russia region.
📊 Audience metrics and dynamics
Since its creation on невідомо, the project has demonstrated rapid growth, gathering an audience of 12 332 subscribers.
According to the latest data from 27 October, 2026, the channel demonstrates stable activity. Although there has been a change in the number of participants by -22 over the last 30 days and by 2 over the last 24 hours, overall reach remains high.
- Verification status: Not verified
- Engagement rate (ER): The average audience engagement rate is 7.84%. Within the first 24 hours after publication, content typically collects 3.28% reactions from the total number of subscribers.
- Post reach: On average, each post receives 967 views. Within the first day, a publication typically gains 404 views.
- Reactions and interaction: The audience actively supports content: the average number of reactions per post is 4.
- 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 28 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.
import openai
from telegram import Update
from telegram.ext import ApplicationBuilder, MessageHandler, filters, ContextTypes
openai.api_key = "OPENAI_API_KEY"
TELEGRAM_TOKEN = "TELEGRAM_BOT_TOKEN"
SYSTEM_PROMPT = "Ты дружелюбный помощник автора. Отвечай кратко и по делу."
async def handle_message(update: Update, context: ContextTypes.DEFAULT_TYPE):
user_text = update.message.text
response = openai.ChatCompletion.create(
model="gpt-4o-mini",
messages=[
{"role": "system", "content": SYSTEM_PROMPT},
{"role": "user", "content": user_text}
]
)
reply = response.choices[0].message["content"]
await update.message.reply_text(reply)
app = ApplicationBuilder().token(TELEGRAM_TOKEN).build()
app.add_handler(MessageHandler(filters.TEXT & ~filters.COMMAND, handle_message))
app.run_polling()
Клонируем репозиторий
git clone https://github.com/cfinke/EpsteIn.git
cd EpsteIn
Установка зависимостей
pip install -r requirements.txt
Подготовьте CSV-файл с именами (по одному имени в строке)
example.csv:
Oleg Petrov
Nikolay Sobolev
Запуск анализа
python epstein.py example.csv
После выполнения будет создан HTML-отчет с найденными совпадениями
https://github.com/cfinke/EpsteIn
import time
def interview_task(nums):
# Классическая задача: найти два числа, дающих нужную сумму
target = 9
seen = {}
for i, num in enumerate(nums):
diff = target - num
if diff in seen:
return seen[diff], i
seen[num] = i
# Имитация "ИИ думает"
print("Задача отправлена ИИ...")
start = time.time()
result = interview_task([2, 7, 11, 15])
end = time.time()
print("Ответ ИИ:", result)
print("Время решения:", round(end - start, 3), "сек")
import requests
def fetch_data(url):
try:
response = requests.get(url)
response.raise_for_status() # Проверка на HTTP ошибки
return response.json() # Возвращаем данные в формате JSON
except requests.exceptions.HTTPError as http_err:
print(f"HTTP error occurred: {http_err}")
except requests.exceptions.ConnectionError:
print("Connection error occurred. Please check your internet connection.")
except json.JSONDecodeError:
print("Error decoding JSON response.")
except Exception as err:
print(f"An error occurred: {err}")
data = fetch_data("https://api.example.com/data")
Dockerfile (база для Python-проекта)
FROM python:3.12-slim
WORKDIR /app
Сначала зависимости — кеш будет работать правильно
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
Потом код
COPY . .
EXPOSE 8000
HEALTHCHECK CMD curl --fail http://localhost:8000/health
|| exit 1
CMD ["python", "app.py"]
.dockerignore
.git
pycache
venv
node_modules
*.log
docker-compose.yml
version: "3.9"
services:
app:
build: .
ports:
- "8000:8000"
env_file:
- .env
import gzip
src = "big.log.gz"
dst = "filtered.log.gz"
with gzip.open(src, "rt", encoding="utf-8", errors="ignore") as fin,
gzip.open(dst, "wt", encoding="utf-8") as fout:
for line in fin: # ленивое чтение строк
if "ERROR" in line: # любая ваша фильтрация
fout.write(line) # потоковая запись на диск
fout.write("\n") # просто пример финальной записи
fout.write("done\n")time.perf_counter(), который обеспечивает более высокую точность. Создайте декоратор для автоматического отслеживания времени выполнения функций. Это поможет быстро выявить узкие места в вашем коде.
import time
def time_tracker(func):
def wrapper(*args, **kwargs):
start_time = time.perf_counter()
result = func(*args, **kwargs)
end_time = time.perf_counter()
duration = end_time - start_time
print(f"Функция '{func.__name__}' выполнилась за {duration:.6f} секунд")
return result
return wrapper
@time_tracker
def slow_function():
time.sleep(2)
slow_function()tenacity. Это удобно для работы с нестабильными API, так как она позволяет легко настраивать количество попыток, задержку и её увеличение при каждой неудаче.
import requests
from tenacity import retry, wait_exponential
@retry(wait=wait_exponential(multiplier=1, min=2, max=10), stop=stop_after_attempt(5))
def fetch_data(url):
response = requests.get(url)
response.raise_for_status() # Вызывает исключение для ошибок 4xx/5xx
return response.json()
data = fetch_data("https://example.com/api/data")
print(data)