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) |
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) |
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
amqp==5.0.6 | |
asgiref==3.3.4 | |
billiard==3.6.4.0 | |
celery==5.1.0 | |
certifi==2020.12.5 | |
chardet==4.0.0 | |
click==7.1.2 | |
click-didyoumean==0.0.3 | |
click-plugins==1.1.1 | |
click-repl==0.1.6 |
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 numpy as np | |
import math | |
# классификация методом k ближайших соседей | |
# X - обучающее множество. | |
# Строки соответствуют объектам, | |
# столбцы - признакам. | |
# Последний столбец - номер класса | |
# k - количество ближайших соседей (не более числа объектов в X) |
NewerOlder