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
"Use Vim settings, rather then Vi settings (much better!). | |
"This must be first, because it changes other options as a side effect. | |
set nocompatible | |
"colors zenburn | |
set background=dark | |
set exrc | |
set secure |
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
set mouse=a | |
set tabstop=4 shiftwidth=4 expandtab | |
highlight ExtraWhitespace ctermbg=red guibg=red | |
match ExtraWhitespace /\s\+$/ | |
set list listchars=tab:·· | |
set number "show line numbers | |
highlight LineNr ctermfg=darkgrey guibg=darkgrey | |
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 collections import defaultdict | |
from enum import Enum | |
class TokenType(Enum): | |
LETTER = 0 | |
NUMBER = 1 | |
OPEN = 2 | |
CLOSE = 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
from functools import partial | |
from logging import getLogger | |
from typing import Callable, Tuple, List, Optional | |
from vk_api import VkApi | |
from vk_api.longpoll import VkEventType, Event, VkLongPoll | |
from repo import Repository, UserState | |
Handler = Callable[[VkApi, Event, UserState], UserState] |
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
class NullType: | |
def __repr__(self): | |
return 'NULL' | |
NULL = NullType() | |
class Db: | |
def __init__(self): |
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
[tg_bot] | |
token = | |
admin_id = | |
support_chat_id = | |
service_chat_id = | |
homework_chat_id = | |
use_redis = true | |
[tg_admin] | |
api_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
import asyncio | |
from asyncio import get_running_loop, AbstractEventLoop | |
from contextvars import Context | |
from logging import getLogger | |
from typing import Dict, List | |
from aiogram import Dispatcher, Bot | |
from .database import Repo | |
from .handlers import register_sender |
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 __future__ import annotations | |
import os | |
from dataclasses import dataclass | |
from typing import List, Dict | |
import boto3 | |
@dataclass |
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
class Helper: | |
def do(self): | |
print(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
class MyString(str): | |
def __init__(self, data): | |
self.data = data | |
def append(self, other): | |
self.data += other | |
def __str__(self): | |
return self.data |
OlderNewer