Skip to content

Instantly share code, notes, and snippets.

View AlgorithmAlchemy's full-sized avatar
💭
Open to job opportunities

AlgorithmAlchemy AlgorithmAlchemy

💭
Open to job opportunities
View GitHub Profile
@AlgorithmAlchemy
AlgorithmAlchemy / conkyrc
Created April 21, 2025 22:58
Виджет системных ресурвсов для LUNUX
# ~/.conkyrc
# Включаем создание отдельного окна для Conky
own_window yes
# Указываем, что окно будет обычным (с рамкой и кнопками)
own_window_type normal
# Отключаем прозрачность окна
own_window_transparent no
@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 / 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 / NiceProgressBar.py
Created June 29, 2023 10:58
NiceProgressBar_one_string
import time
def progress_bar(progress, total, bar_length=40):
filled_length = int(bar_length * progress // total)
bar = '█' * filled_length + '-' * (bar_length - filled_length)
percentage = progress / total * 100
print(f'\rProgress: [{bar}] {percentage:.2f}%', end='', flush=True)
def simulate_process(total_time):
for t in range(total_time + 1):
@AlgorithmAlchemy
AlgorithmAlchemy / bar.py
Created June 29, 2023 10:41
Simple Progress bar
import time
def progress_bar(progress, total, bar_length=40):
filled_length = int(bar_length * progress // total)
bar = '█' * filled_length + '-' * (bar_length - filled_length)
percentage = progress / total * 100
print(f'Progress: [{bar}] {percentage:.2f}%')
def simulate_process(total_time):
for t in range(total_time + 1):
@AlgorithmAlchemy
AlgorithmAlchemy / inst_parser.py
Last active June 29, 2023 10:42
Simple instagram fridnd local parser
from bs4 import BeautifulSoup
# Открываем HTML-файл
with open('file.html', 'r', encoding='utf-8') as file:
html_content = file.read()
# Создаем объект BeautifulSoup для парсинга
soup = BeautifulSoup(html_content, 'html.parser')
# Находим все блоки <div> с определенным классом, содержащим имена "alerionn"
@AlgorithmAlchemy
AlgorithmAlchemy / vk_paarser.py
Last active June 29, 2023 10:43
Simple Vk htlml page friend parser
from bs4 import BeautifulSoup
# Открываем HTML-файл
with open('file.html', 'r', encoding='utf-8') as file:
html_content = file.read()
# Создаем объект BeautifulSoup для парсинга
soup = BeautifulSoup(html_content, 'html.parser')
# Находим все блоки с классом "Friends__item"
import winreg, os, sys
import winsound
# Путь к исполняемому файлу скрипта
script_path = os.path.abspath(__file__)
key_path = "SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Run"
key_name = "YourScriptName"
@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):
@AlgorithmAlchemy
AlgorithmAlchemy / aior.py
Last active June 29, 2023 10:45
Aiogram 2.x chat member left | chat_member_on | ChatMemberUpdated
from aiogram import Bot, Dispatcher, executor, types
from aiogram.types import AllowedUpdates
import config
bot = Bot(token=config.API_TOKEN)
dp = Dispatcher(bot)
@dp.message_handler(commands=['start'], chat_type='private')