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 / turtle.py
Last active June 29, 2023 10:56
fractal
import turtle
from turtle import speed, bgcolor, colormode, fd, rt, pencolor
speed(15)
bgcolor('black')
r, g, b = 255, 0, 0
def polygon(n, size=80):
if n > 2: # <- многоугольников меньше 3 углов я не знаю :)
import turtle
from turtle import speed, bgcolor, colormode, fd, rt, pencolor
speed(15)
bgcolor('black')
r, g, b = 255, 0, 0
for i in range(255 * 2):
colormode(255)
import turtle
from turtle import speed, bgcolor, colormode, fd, rt, pencolor
speed(50)
bgcolor('black')
r, g, b = 255, 0, 0
for i in range(255 * 2):
colormode(255)
@Deathcrash
Deathcrash / txt_drop.py
Created May 26, 2022 23:37
Удаляет дубликат и оригинал в txt
import re
from tkinter import Tk
from tkinter.filedialog import askopenfilename
Tk().withdraw()
filepath = askopenfilename()
users_list = list()
# код для удаления из текстовика лишней инфы
with open(filepath) as f:
@Deathcrash
Deathcrash / duble_delete.py
Last active May 26, 2022 23:08
Txt file duoble deleter python.py
import re
from tkinter import Tk
from tkinter.filedialog import askopenfilename
Tk().withdraw()
filepath = askopenfilename()
users_list = list()
# код для удаления из текстовика лишней инфы
with open(filepath, "r+") as f:
import re
from tkinter import Tk
from tkinter.filedialog import askopenfilename
Tk().withdraw()
filepath = askopenfilename()
users_list = list()
# код для удаления из текстовика лишней инфы
with open(filepath) as f:
@Deathcrash
Deathcrash / sqlite_from_txt.py
Last active June 29, 2023 10:50
sqlite3 заполнитель из txt
import sqlite3
import time
db = sqlite3.connect('users.sqlite')
connect = db.cursor()
f = open('text')
for line in f:
user_id = line
@Deathcrash
Deathcrash / aiogram_sub_cheker.py
Last active June 29, 2023 10:51
Aiogram Sub Checker
async def suber(us_mission_count, cnt, count_channel, user_id, prize_num):
# проверяем количество подписок юзера если 0 выходим из функции
if us_mission_count != 0:
await asyncio.sleep(1)
print(cnt)
cursors = connect.execute(f'''SELECT url, chat_id FROM posts ''')
# проверяем заранее количество каналов для обязательной подписки
ch_count = 0
check_user_subctibe = 0 # проверяем на сколько каналов подписан пользователь
for channel in cursors:
@Deathcrash
Deathcrash / youtube_dll.py
Last active June 29, 2023 10:52
YouTube Dll donwload
format = video_format_id_1
link_mess = video_url_1
print(link_mess)
chat_id = call.message.chat.id # автор сообщения
limit = 0
# код для проверки лимита на скачивание у пользователя
cursor = connect.execute(f'''SELECT day_limit
FROM users
WHERE chat_id = {chat_id}''')
@Deathcrash
Deathcrash / list_adden.py
Last active June 29, 2023 10:52
List adden
start_parse_type = input("Select the type of gun to start parsing.\n\n"
"1 - all weapon\n"
"2 - Custom weapon\n"
"Please enter: ")
type_list = ['machinegun', 'smg', 'pistol', 'rifle', 'shotgun']
parse_list = []
if int(start_parse_type) == 1:
for i in type_list:
print(i)