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 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 углов я не знаю :) |
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 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) |
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 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) |
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 re | |
from tkinter import Tk | |
from tkinter.filedialog import askopenfilename | |
Tk().withdraw() | |
filepath = askopenfilename() | |
users_list = list() | |
# код для удаления из текстовика лишней инфы | |
with open(filepath) as f: |
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 re | |
from tkinter import Tk | |
from tkinter.filedialog import askopenfilename | |
Tk().withdraw() | |
filepath = askopenfilename() | |
users_list = list() | |
# код для удаления из текстовика лишней инфы | |
with open(filepath, "r+") as f: |
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 re | |
from tkinter import Tk | |
from tkinter.filedialog import askopenfilename | |
Tk().withdraw() | |
filepath = askopenfilename() | |
users_list = list() | |
# код для удаления из текстовика лишней инфы | |
with open(filepath) as f: |
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 sqlite3 | |
import time | |
db = sqlite3.connect('users.sqlite') | |
connect = db.cursor() | |
f = open('text') | |
for line in f: | |
user_id = line |
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
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: |
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
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}''') |
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
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) |