Skip to content

Instantly share code, notes, and snippets.

View divaltor's full-sized avatar
🪶
state of delight

Vlad Vladov divaltor

🪶
state of delight
View GitHub Profile
@divaltor
divaltor / theme.toml
Created April 20, 2025 22:41
Flatwhite Theme
"attribute" = { fg = "blue_text", bg = "blue_bg" }
"comment" = { fg = "base3" }
"comment.line" = { fg = "base2", bg = "base6" }
"comment.block" = { fg = "base2", bg = "base6" }
"comment.block.documentation" = { fg = "base2", bg = "base6" }
"constant" = { fg = "blue_text", bg = "blue_bg" }
"constructor" = { fg = "base1" }
"function" = { fg = "base1", modifiers = ["bold"] }
"keyword" = { fg = "purple_text", bg = "purple_bg" }
.model small
.stack 100h
.data
words db 200 dup(?) ; массив для хранения 20 слов по 10 символов
unique_words db 200 dup(?) ; массив для уникальных слов
word_count dw 20 ; количество слов
unique_count dw 0 ; количество уникальных слов
.code
main proc
@divaltor
divaltor / lock.log
Created February 2, 2023 20:28
poetry lock -vvv
Updating dependencies
Resolving dependencies...
1: fact: spaakl is 1.0.0
1: derived: spaakl
1: fact: spaakl depends on fastapi (^0.89.1)
1: fact: spaakl depends on uvicorn (^0.20.0)
1: fact: spaakl depends on pydantic (^1.10.2)
1: fact: spaakl depends on SQLAlchemy (^2.0.1)
1: fact: spaakl depends on greenlet (^2.0.1)
1: fact: spaakl depends on bcrypt (^4.0.1)
@divaltor
divaltor / pyproject.toml
Created February 2, 2023 20:27
Poetry issue
[tool.poetry]
name = "test"
version = "1.0.0"
description = ""
authors = ["Your Name <you@example.com>"]
[tool.poetry.dependencies]
python = "^3.11"
fastapi = "^0.89.1"
uvicorn = {version = "^0.20.0", extras = ["standard"]}
[Unit]
Description=Celery service
After=network.target
[Service]
Type=forking
User=root
Group=www-data
EnvironmentFile=/etc/conf.d/celery
WorkingDirectory=/var/www/zeustream_api
@divaltor
divaltor / home.py
Created December 12, 2020 21:42
HSE
import csv
with open('goods.csv', 'r', encoding='utf-8') as file:
data = list(csv.reader(file, delimiter=';'))
price = int(input())
with open('filtered-goods.csv', 'w', newline='', encoding='utf-8') as write_file:
writer = csv.writer(write_file, delimiter=';')
for item in data:
class YMLParser:
@logger.catch
def __init__(self, file: str, path_name: str):
super().__init__()
logger.info(f'YML FILE: {file=}')
self.path_name = path_name
self.file_name = file.split('.')[0].split(os.sep)[-1]
self.feed = yml.parse(file)
self.download = False
def allow_http_parse(func):
def wrapper(*args, **kwargs):
setattr(func, 'http_parse', True)
return func(*args, **kwargs)
return wrapper
class Parser(DriverMixin):
@allow_http_parse
int power_n(int num, short n) {
__asm {
mov cx, n
mov eax, num
dec cx
start:
imul n
loop start
mov num, eax
}
SELECT L.Name AS 'Наименование дисциплины',
COUNT(DISTINCT L.TeacherID) AS 'Число преподавателей',
COUNT(DISTINCT L.DepID) AS 'Число кафедр',
COUNT(DISTINCT L.GroupID) AS 'Число групп',
SUM(DISTINCT L.Quantity) AS 'Число студентов'
FROM (SELECT Sg.GroupID, S.Name, T.TeacherID, T.DepID, Quantity FROM SUBJECT S
JOIN UCHPLAN U ON S.SubjID = U.SubjID
JOIN TEACHER T ON T.TeacherID = U.TeacherID
JOIN SGROUP Sg ON U.GroupID = Sg.GroupID) L
--WHERE T.Post = 'Профессор'