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 logging | |
import gunicorn.app.base | |
from fastapi import FastAPI | |
from loguru import logger | |
class InterceptHandler(logging.StreamHandler): | |
def emit(self, record): | |
# Get corresponding Loguru level if it exists |
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 sys | |
import importlib | |
import asyncio | |
import binascii | |
from bitstring import BitArray, ConstBitStream | |
import protocol | |
import random | |
import html | |
import time | |
from time import mktime |
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
#!/usr/bin/env python3 | |
# -*- coding: utf-8 -*- | |
import os | |
import csv | |
import sys | |
import time | |
import json | |
import argparse | |
import requests |
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
def extract_unique_code(text): | |
# Extracts the unique_code from the sent /start command. | |
return text.split()[1] if len(text.split()) > 1 else None | |
create_tables() | |
@dp.message_handler(commands=["start"], state="*") | |
async def user_registration(message: types.Message): | |
register_user(message.from_user.id, message.from_user.username, message.from_user.first_name, message.from_user.last_name) | |
#Выделение 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
31 | |
3 35 21 14 | |
3 47 27 68 | |
2 83 30 | |
2 39 86 | |
3 24 93 54 | |
2 35 98 | |
2 12 10 | |
4 10 29 49 92 | |
6 82 25 91 55 87 84 |
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 pygame as pg | |
from random import randint, choice | |
from pgex.widgets import Text | |
from pgex.parameters import colors | |
SCREEN_WIDTH = 800 | |
SCREEN_HEIGHT = 600 | |
FPS = 60 |
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 pygame as pg | |
from random import randint, choice | |
from pgex.widgets import Text | |
from pgex.parameters import colors | |
SCREEN_WIDTH = 800 | |
SCREEN_HEIGHT = 600 | |
FPS = 60 |
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 django.db import models | |
from django.contrib.auth import get_user_model | |
from django.contrib.contenttypes.models import ContentType | |
User = get_user_model() | |
#settings.AUTH_USER_MODEL | |
#******* | |
#1 Category | |
#2 Product | |
#3 CartProduct | |
#4 Cart |
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 pygame as pg | |
from pgex.parameters import colors | |
SCREEN_WIDTH = 800 | |
SCREEN_HEIGHT = 600 | |
FPS = 60 | |
pg.init() | |
screen = pg.display.set_mode((SCREEN_WIDTH, SCREEN_HEIGHT)) |
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 vk_api | |
from vk_api.bot_longpoll import VkBotLongPoll, VkBotEventType | |
from vk_api.keyboard import VkKeyboard, VkKeyboardColor | |
import random | |
import time | |
import vkcoin | |
token = "a6dc463f2e34dd52b2345f06891046d136800292b9a1b86dc4cfb80e0e318f6897b08d24ca78bc7fd3ccf" # токен от группы | |
vk_session = vk_api.VkApi(token=token) | |
session_api = vk_session.get_api() | |
vk = vk_api.VkApi(token=token) |
NewerOlder