Skip to content

Instantly share code, notes, and snippets.

View Deathcrash's full-sized avatar
💭
What's happening?

No_name Deathcrash

💭
What's happening?
View GitHub Profile
@Deathcrash
Deathcrash / 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):
@Deathcrash
Deathcrash / 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):
@Deathcrash
Deathcrash / 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"
@Deathcrash
Deathcrash / 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"
@Deathcrash
Deathcrash / 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):
@Deathcrash
Deathcrash / 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')
@Deathcrash
Deathcrash / kaktus.py
Created July 1, 2022 03:29
discord_little_temka
import discord
from discord.ext import commands
intents = discord.Intents.all()
client = commands.Bot(command_prefix='.', intents=intents)
client.remove_command('help')
# Words
hello_words = ['hello', 'hi', 'привет', 'privet', 'kу', 'ку', 'здарова']
answer_words = ['узнать информацию о сервере', 'какая информация', 'команды', 'команды сервера', 'что здесь делать']
from bs4 import BeautifulSoup
import requests
import sqlite3
import matplotlib
db = sqlite3.connect('posts.sqlite', check_same_thread=False)
connect = db.cursor()
connect.execute('''CREATE TABLE IF NOT EXISTS price (
id INTEGER PRIMARY KEY AUTOINCREMENT,
full_name TEXT,
@Deathcrash
Deathcrash / dir_clear.py
Created June 1, 2022 19:59
Пересоздаём папку
# предварительно чистим кэш чистим кэш видео в папке с файлом
try:
dir_name = "cache/"
files = os.listdir(dir_name)
fl_cnt = 0
for i in files:
fl_cnt += 1
print("cash_file:", fl_cnt, " ", i)
if fl_cnt >= 1:
shutil.rmtree(dir_name)