Забудь про дорогой софт и вечную подписку — IOPaint это бесплатный, open-source инструмент, который превращает любые фото в шедевры с помощью ИИ.
Что умеет:
* Stable Diffusion, Dreamshaper, BrushNet, Paint-by-Example
* Плагины для улучшения лица (GFPGAN, RestoreFormer), удаления фона, повышения качества (RealESRGAN), аниме-сегментации и многого другого!
$ pip3 install iopaint
$ iopaint start --model=lama --device=cpu --port=8080
#python #soft #code
Please open Telegram to view this post
VIEW IN TELEGRAM
Please open Telegram to view this post
VIEW IN TELEGRAM
1👍74🔥20❤4
Инструмент делает запрос к ExchangeRate API и показывает актуальный курс USD к RUB — без заморочек и регистрации.
import requests
from typing import Optional
def get_exchange_rate(base_currency: str, target_currency: str) -> Optional[float]:
"""
Получает курс обмена из base_currency в target_currency.
:param base_currency: Базовая валюта (например, 'USD').
:param target_currency: Целевая валюта (например, 'RUB').
:return: Курс обмена или None в случае ошибки.
"""
url = f"https://open.er-api.com/v6/latest/{base_currency}"
try:
response = requests.get(url, timeout=10)
response.raise_for_status()
data = response.json()
rate = data["rates"].get(target_currency)
if rate is None:
print(f"Курс для {target_currency} не найден.")
return None
return rate
except requests.RequestException as e:
print(f"Ошибка при запросе к API: {e}")
return None
if __name__ == "__main__":
base = "USD"
target = "RUB"
rate = get_exchange_rate(base, target)
if rate:
print(f"Курс {base} к {target}: {rate}")
else:
print("Не удалось получить курс обмена.")
# Курс USD к RUB: 80.926191
#python #code #soft
Please open Telegram to view this post
VIEW IN TELEGRAM
👍50🔥13❤7🫡3
ItsCaptchaBot — умный бот с капчей, который отфильтрует подозрительных новичков ещё до «привет».
— Добавляешь бота в чат;
— Даёшь права на удаление сообщений и ограничение участников;
— Каждый новый юзер должен пройти капчу в течение 10 минут;
— Не прошёл? Автокик. Всё просто.
#python #soft #code
Please open Telegram to view this post
VIEW IN TELEGRAM
👍38🔥9❤3🤯1
Хочешь принимать заказы прямо в Telegram? Без сайтов, без лишних кликов — только бот, каталог и кнопка "Оформить заказ".
Telegram Shop Bot — код готового шаблона телеграм магазина.
Всё просто:
→ Заходишь в меню
→
→
→
→
Красота? Красота.
git clone https://github.com/NikolaySimakov/Shop-bot.git
cd Shop-bot
# Создаем виртуальное окружение
python3 -m venv venv
source venv/bin/activate
# Устанавливаем зависимости
pip install -r requirements.txt
BOT_TOKEN=твой_токен_бота
ADMINS=123456789,987654321
python3 app.py
#python #soft #code
Please open Telegram to view this post
VIEW IN TELEGRAM
3👍49🔥16❤9🤯2😱1🫡1
[PYTHON:TODAY]
Please open Telegram to view this post
VIEW IN TELEGRAM
1🔥26❤3👍2
This media is not supported in your browser
VIEW IN TELEGRAM
Крутой open-source проект, который позволяет управлять устройствами с помощью движений глаз. Больше не нужно тянуться к клавиатуре – теперь всё решает взгляд!
Что умеет:
Где можно применить?
🔬 Эксперименты с интерфейсами будущего.
$ git clone https://github.com/NativeSensors/EyeGestures.git
$ cd EyeGestures
$ pip install -r requirements.txt
или
python3 -m pip install eyeGestures
Открытый код, документация и примеры использования.
Будущее уже здесь — открываем мир взглядом!
#soft #python #code
Please open Telegram to view this post
VIEW IN TELEGRAM
👍38❤12🔥11😱3
EasyOCR — мощный и простой в использовании инструмент по распознаванию символов.
Пример использования на изображении
Установка:
pip install easyocr
⚙️ GitHub/Инструкция#python #soft #code #github
Please open Telegram to view this post
VIEW IN TELEGRAM
Please open Telegram to view this post
VIEW IN TELEGRAM
👍52🔥14❤9
Two Claps Open — гениально простой инструмент, который открывает Chrome браузер или активирует голосового помощника и открывает любую ссылку, когда ты хлопаешь в ладоши дважды.
pyaudio
;$ git clone https://github.com/Yutarop/two_claps_open
$ cd two_claps_open
$ pip install -r requirements-core.txt
or
$ pip install -r requirements-agent.txt
$ python two_claps_open.py
or
$ python agent_on_clap.py
Если ты любишь писать скрипты, которые реально удивляют — попробуй и покажи друзьям.
#python #soft #code
Please open Telegram to view this post
VIEW IN TELEGRAM
Please open Telegram to view this post
VIEW IN TELEGRAM
🔥32👍13❤11🤯3
ART — минималистичная, но чертовски стильная библиотека для Python, с которой ты за секунду создашь красивый ASCII-логотип прямо в консоли.
ART — это быстро, просто и эффектно.
pip install art
#python #soft #code #github
Please open Telegram to view this post
VIEW IN TELEGRAM
Please open Telegram to view this post
VIEW IN TELEGRAM
👍44🔥9❤5🤯1
Rocket — БЕСПЛАТНАЯ нейросеть, которая превращает идею в полноценный сервис за минуты.
Ты просто пишешь: "Хочу сервис с регистрацией, оплатой и пушами" — и через несколько минут получаешь готовый веб-сайт или приложение.
#nn #soft #code
Please open Telegram to view this post
VIEW IN TELEGRAM
🔥60🤯10❤8🫡6😱3👍2
Никаких сторонних библиотек — всё делает встроенный модуль
zipfile
import zipfile
def make_zip(target_files: list[str], zip_name: str = 'data.zip') -> None:
"""Упаковывает файлы в ZIP-архив с указанным именем."""
with zipfile.ZipFile(zip_name, 'w') as archive:
for filename in target_files:
archive.write(filename) # Добавляем файл в архив
print(f"✅ Архив {zip_name} создан!")
make_zip(['image.png', 'notes.md'])
#python #code
Please open Telegram to view this post
VIEW IN TELEGRAM
👍48🔥10❤3
This media is not supported in your browser
VIEW IN TELEGRAM
#soft #code
Please open Telegram to view this post
VIEW IN TELEGRAM
🔥58👍14❤4🫡3😱1
Скрипт, который:
🌡 Показывает температуру
# pip install GPUtil tabulate
import GPUtil
from tabulate import tabulate
from typing import List, Tuple
def gpu_info() -> str:
"""
Получает информацию о доступных GPU: загрузка, температура, объём памяти.
Возвращает отформатированную таблицу.
"""
gpus = GPUtil.getGPUs()
gpus_list: List[Tuple] = []
for gpu in gpus:
gpus_list.append((
gpu.id,
gpu.name,
f"{gpu.load * 100:.1f}%",
f"{gpu.memoryFree}MB",
f"{gpu.memoryUsed}MB",
f"{gpu.memoryTotal}MB",
f"{gpu.temperature}°C"
))
return tabulate(
gpus_list,
headers=["id", "name", "load", "free memory", "used memory", "total memory", "temperature"],
tablefmt="pretty"
)
if __name__ == "__main__":
print(gpu_info())
Проверь, как там твоя RTX под стрессом.
#python #soft #code #cheatsheet
Please open Telegram to view this post
VIEW IN TELEGRAM
👍50🔥23❤13
This media is not supported in your browser
VIEW IN TELEGRAM
MySite AI — нейронка, которая превращает текст в готовый сайт.
Без кода, без шаблонов, без геморроя.
и через пару секунд у тебя готовый лендинг с контентом, блоками и оформлением.
Отлично подойдет для:
Сохраняем и пробуем ТУТ
#nn #soft #code
Please open Telegram to view this post
VIEW IN TELEGRAM
👍38🔥9❤2🤯1
Знакомься с Pystray — библиотека, которая превращает твой скрипт в настоящее десктоп-приложение с иконкой рядом с часами.
pip install pystray
Используй Pystray, чтобы твои скрипты выглядели как настоящие нативные приложения.
И никаких окон. Только стиль и функциональность.
#python #soft #code #github
Please open Telegram to view this post
VIEW IN TELEGRAM
👍58❤14🔥10
Простой скрипт, который покажет, как чувствует себя твой процессор — прямо в терминале:
$ sudo apt install lm-sensors # для Nix систем
$ pip install psutil
import psutil
from typing import Optional
def get_cpu_temperature() -> Optional[str]:
"""
Получает текущую температуру процессора с поддержкой датчиков.
Возвращает:
Строку с температурой CPU в градусах Цельсия или сообщение об ошибке.
"""
temps = psutil.sensors_temperatures()
if not temps:
return "Температурные датчики не найдены."
# Для процессоров AMD, чаще всего данные находятся в "k10temp"
if "k10temp" in temps:
for entry in temps["k10temp"]:
if entry.label in ("Tctl", "Tdie"):
return f"Температура CPU: {entry.current:.1f}°C"
return "Сенсор 'k10temp' найден, но метка Tctl отсутствует."
# Универсальный обход всех адаптеров (на случай, если сенсоры называются иначе)
for name, entries in temps.items():
for entry in entries:
if entry.label.lower().startswith("package") or "core" in entry.label.lower():
return f"Температура CPU: {entry.current:.1f}°C"
return "Не удалось определить температуру CPU."
def main() -> None:
"""Главная точка входа в скрипт."""
print(get_cpu_temperature())
if __name__ == "__main__":
main()
#python #code
Please open Telegram to view this post
VIEW IN TELEGRAM
🔥42👍17❤8😱2
Этот скрипт превращает твою вебку в систему распознавания лиц и глаз.
Установи OpenCV:
bash
$ pip install opencv-python
haarcascade_frontalface_default.xml
haarcascade_eye.xml
Код:
python
import cv2 as cv
def detect_faces_and_eyes():
"""
Detects faces and eyes in real-time using the webcam.
Press 'q' to exit the program.
"""
# Load the pre-trained classifiers for face and eye detection
face_cascade = cv.CascadeClassifier(r"..\libs\haarcascade_frontalface_default.xml")
eye_cascade = cv.CascadeClassifier(r"..\libs\haarcascade_eye.xml")
# Open the webcam
cap = cv.VideoCapture(0)
while cap.isOpened():
# Read a frame from the webcam
flag, img = cap.read()
# Convert the frame to grayscale for better performance
gray = cv.cvtColor(img, cv.COLOR_BGR2GRAY)
# Detect faces in the frame
faces = face_cascade.detectMultiScale(gray, scaleFactor=1.1, minNeighbors=7)
# Detect eyes in the frame
eyes = eye_cascade.detectMultiScale(gray, scaleFactor=1.1, minNeighbors=7)
# Draw rectangles around faces and eyes
for x, y, w, h in faces:
cv.rectangle(img, (x, y), (x + w, y + h), (0, 255, 0), 1)
for a, b, c, d in eyes:
cv.rectangle(img, (a, b), (a + c, b + d), (255, 0, 0), 1)
# Display the resulting frame
cv.imshow("Face and Eye Detection", img)
# Check for the 'q' key to exit the program
key = cv.waitKey(1)
if key == ord("q"):
break
# Release the webcam and close all windows
cap.release()
cv.destroyAllWindows()
if __name__ == "__main__":
# Call the main function
detect_faces_and_eyes()
Сохрани — пригодится!
#python #soft #code
Please open Telegram to view this post
VIEW IN TELEGRAM
👍67🔥23❤14
Хватит учить синтаксис всухую — пора писать реальные проекты, от простых до мощных.
✔️ 52 идеи.
✔️ Исходный код.
✔️ Пояснения к каждому проекту.
— собрать портфолио
— пройти собес
— прокачаться в Python и выйти на фриланс
Забирай, сохраняй, делись!
#python #doc #code
Please open Telegram to view this post
VIEW IN TELEGRAM
1🔥39👍11❤3
Please open Telegram to view this post
VIEW IN TELEGRAM
👍14🔥3❤2