Skip to content

Instantly share code, notes, and snippets.

View AlgorithmAlchemy's full-sized avatar

AlgorithmAlchemy AlgorithmAlchemy

View GitHub Profile
@AlgorithmAlchemy
AlgorithmAlchemy / audio_play.py
Last active June 29, 2023 10:55
audio play python
from gtts import gTTS
import os
import subprocess
from subprocess import check_output
text = "Global warming is the long-term rise in the average temperature of the Earth’s climate system"
language = "en"
speech = gTTS(text=text, lang=language, slow=False)
speech.save("text.mp3")
os.system('nircmd mediaplay 10000 text.mp3')
import requests
url_change = 'https://openexchangerates.org/api/latest.json?app_id=565db73ce703480cb8d8849e32f32035'
r = requests.get(url_change)
r = r.json()
print(r["rates"]["CNY"])
@AlgorithmAlchemy
AlgorithmAlchemy / port_scanner.py
Last active June 29, 2023 10:53
Port Scanner python
# war 1
import socket
def scan_port(ip,port):
sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
sock.settimeout(0.5)
try:
connect = sock.connect((ip,port))
print('Port :',port,' its open.')
sock.close()
@AlgorithmAlchemy
AlgorithmAlchemy / mailing.py
Last active June 29, 2023 10:44
tg_mailing
import os
import time
from threading import Thread
from opentele.td import TDesktop
from opentele.api import UseCurrentSession
accounts = os.listdir(os.path.abspath('input/telegram_accounts'))
async def telegram_attack(target, time_a, mes):
import winreg, os, sys
import winsound
# Путь к исполняемому файлу скрипта
script_path = os.path.abspath(__file__)
key_path = "SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Run"
key_name = "YourScriptName"
async def update_progress(chat_id):
message = await bot.send_message(chat_id, "Генерация в процессе...\n0% [ ]")
try:
for i in range(1, 11):
progress = i * 10
# Отображаем серые блоки
gray_blocks = '▒' * i + '░' * (10 - i)
await bot.edit_message_text(f"Генерация в процессе...\n{progress}% [{gray_blocks}]", chat_id, message.message_id)
await asyncio.sleep(0.5) # Даем время для отображения серых блоков
@AlgorithmAlchemy
AlgorithmAlchemy / python, pywifi, time
Created September 10, 2024 12:19
Подключение к wifi python pywifi
import pywifi
from pywifi import const, Profile
import time
def get_wifi_connections():
wifi = pywifi.PyWiFi()
interfaces = wifi.interfaces()
print("Состояние подключения Wi-Fi адаптеров:")
@AlgorithmAlchemy
AlgorithmAlchemy / Ожидание появления элементов - SELENIUM
Last active October 5, 2024 23:29
Используем WebDriverWait для ожидания появления элемента на странице перед взаимодействием с ним. Это помогает избежать ситуаций, когда элемент еще не загружен или не доступен для клика.
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support import expected_conditions as EC
from selenium.webdriver.common.by import By
def click_element(driver, by, value, timeout=10):
"""Ожидание элемента и нажатие на него."""
try:
element = WebDriverWait(driver, timeout).until(
EC.element_to_be_clickable((by, value))
)
@AlgorithmAlchemy
AlgorithmAlchemy / conkyrc - виджет linux
Last active August 7, 2025 08:50
Виджет системных ресурвсов для LUNUX
# ~/.conkyrc
own_window yes
own_window_type normal
own_window_transparent no
own_window_hints undecorated,sticky,skip_taskbar,skip_pager
own_window_class Conky
own_window_title Conky
own_window_geometry 300x400+100+100
@AlgorithmAlchemy
AlgorithmAlchemy / skills_map.md
Last active February 23, 2026 22:16
Skills Map — стек

Skill Map


Python & Backend

Навык / Технология Уровень Комментарий
Python (3.6–3.14) Уверенный ★★ asyncio, OOP, typing, pathlib
FastAPI Уверенный ★★ deps, middlewares, websockets
Flask Эксперт ★★★ + Jinja, Blueprints, CLI