[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 452 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 452 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.
from dataclasses import dataclass
from pathlib import Path
from typing import Tuple, Optional
import cv2
@dataclass(frozen=True)
class CaptureConfig:
"""Настройки захвата видео с веб‑камеры."""
device_index: int = 0 # индекс камеры (0 — встроенная)
width: int = 640 # ширина кадра
height: int = 480 # высота кадра
fps: int = 20 # кадров в секунду
fourcc: str = "mp4v" # кодек для MP4: mp4v, для AVI: XVID
def create_capture(cfg: CaptureConfig) -> cv2.VideoCapture:
"""Создаёт и настраивает объект VideoCapture."""
cap = cv2.VideoCapture(cfg.device_index)
if not cap.isOpened():
raise RuntimeError("Не удалось открыть веб‑камеру")
cap.set(cv2.CAP_PROP_FRAME_WIDTH, cfg.width)
cap.set(cv2.CAP_PROP_FRAME_HEIGHT, cfg.height)
cap.set(cv2.CAP_PROP_FPS, cfg.fps)
return cap
def create_writer(output_path: Path, cfg: CaptureConfig) -> cv2.VideoWriter:
"""Создаёт объект записи видео (VideoWriter)."""
output_path.parent.mkdir(parents=True, exist_ok=True)
fourcc = cv2.VideoWriter_fourcc(*cfg.fourcc)
writer = cv2.VideoWriter(str(output_path), fourcc, cfg.fps, (cfg.width, cfg.height))
if not writer.isOpened():
raise RuntimeError(f"Не удалось создать файл для записи: {output_path}")
return writer
def record_from_webcam(
output_path: Path,
cfg: CaptureConfig = CaptureConfig(),
window_title: str = "Video",
) -> Tuple[bool, Optional[str]]:
"""
Захватывает поток с веб‑камеры, показывает превью и пишет в файл.
Возвращает (успех, сообщение_ошибки).
Остановка по клавише 'q'.
"""
try:
cap = create_capture(cfg)
writer = create_writer(output_path, cfg)
except Exception as e:
return False, str(e)
try:
while True:
ok, frame = cap.read()
if not ok:
return False, "Не удалось прочитать кадр с камеры"
writer.write(frame)
cv2.imshow(window_title, frame)
# выход по 'q'
if cv2.waitKey(1) & 0xFF == ord("q"):
break
return True, None
finally:
cap.release()
writer.release()
cv2.destroyAllWindows()
def main() -> None:
cfg = CaptureConfig(
device_index=0,
width=640,
height=480,
fps=20,
fourcc="mp4v", # для .mp4; можно 'XVID' для .avi
)
ok, err = record_from_webcam(Path("records/vid.mp4"), cfg)
if ok:
print("✅ Запись завершена. Файл: records/vid.mp4")
else:
print(f"❌ Ошибка: {err}")
if __name__ == "__main__":
main()
Код структурирован на функции, есть @dataclass для настроек — бери, редактируй и встраивай в свой проект.
📦 Зависимости: pip install opencv-python
📁 Файл сохраняется в: records/vid.mp4
Сохраняй, пригодится! 👍
#python #soft #codefrom fpdf import FPDF
from pathlib import Path
from typing import List
def images_to_pdf(images: List[str], output: str = "output.pdf") -> None:
"""
Конвертирует список изображений в единый PDF-файл.
:param images: список путей к изображениям (JPG, PNG и т.д.)
:param output: имя выходного PDF-файла
"""
pdf = FPDF()
for img_path in images:
if not Path(img_path).exists():
print(f"⚠️ Файл не найден: {img_path}")
continue
pdf.add_page()
pdf.image(img_path, x=10, y=10, w=180) # подгоняем ширину под страницу
pdf.output(output)
print(f"✅ PDF создан: {output}")
if __name__ == "__main__":
# Пример использования
images_to_pdf(
["image1.jpg", "image2.png", "image3.jpg"],
"images_collection.pdf"
)
Что умеет скрипт:
➡️Конвертирует сразу пачку фоток в единый PDF
➡️Автоматически подгоняет размер под страницу
➡️Проверяет файлы и сохраняет всё в удобный документ
➡️Идеально для портфолио, отчётов, учебных материалов
😰 Только Python и немного магии!
#python #soft #codepip install pyautogui
Простой пример, как сделать скриншот экрана:
python
import pyautogui
im1 = pyautogui.screenshot()
im2 = pyautogui.screenshot('my_screenshot.png')
👨💻 Документация/Инструкция
Автоматизируй ПК и освободи время для реально важных задач! 👍
#python #soft #code