This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import winreg, os, sys | |
import winsound | |
# Путь к исполняемому файлу скрипта | |
script_path = os.path.abspath(__file__) | |
key_path = "SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Run" | |
key_name = "YourScriptName" | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 = ['узнать информацию о сервере', 'какая информация', 'команды', 'команды сервера', 'что здесь делать'] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# предварительно чистим кэш чистим кэш видео в папке с файлом | |
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) |
NewerOlder