Skip to content

Instantly share code, notes, and snippets.

View Kiruha01's full-sized avatar

Kirill Lisov Kiruha01

  • Saint-Petersburg
View GitHub Profile
@Kiruha01
Kiruha01 / full.xml
Last active June 25, 2024 15:53
RSS
<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
<channel>
<title>NYT &gt; World News</title>
<link>https://news.com/section/world</link>
<item>
<title>Crazy news 1.</title>
<description>
Crazy? I was crazy once. They locked me in a room. A rubber room. A rubber room with rats. And rats make me crazy.
</description>
@Kiruha01
Kiruha01 / news.rss
Last active November 17, 2023 07:21
<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:media="http://search.yahoo.com/mrss/" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:nyt="http://www.nytimes.com/namespaces/rss/2.0" version="2.0"><script/>
<channel>
<title>NYT &gt; World &gt; Americas</title>
<link>https://www.nytimes.com/section/world/americas</link>
<atom:link href="https://rss.nytimes.com/services/xml/rss/nyt/Americas.xml" rel="self" type="application/rss+xml"/>
<description/>
<language>en-us</language>
<copyright>Copyright 2023 The New York Times Company</copyright>
<lastBuildDate>Tue, 07 Nov 2023 15:16:29 +0000</lastBuildDate>
@Kiruha01
Kiruha01 / main.py
Created June 29, 2023 08:37
PRC openapi
def get_application(
add_internal_error_handler: bool = True,
callback_repo: Optional[CallbackRepoProto] = None,
) -> FastAPI:
"""Create configured server application instance."""
application = FastAPI(title=BOT_PROJECT_NAME)
def get_custom_openapi():
return custom_openapi(
title="a",
@Kiruha01
Kiruha01 / README.md
Last active January 21, 2023 07:18
Promocodes

Promocodes

Установка зависимостей

Открой в терминале эту папку и введи

pip install -r requirements.txt

Инструкция

Открой файл config.yml и введи данные:

@Kiruha01
Kiruha01 / img.png
Last active June 10, 2022 12:09
Polynomial Interpolation Via Point Trajectories
img.png
@Kiruha01
Kiruha01 / Davidon-Flatcher-Pauel.py
Created June 1, 2022 14:02
Метод Дэвидона-Флетчера-Пауэлла
import math
h = 0.01
x1 = - 2
eps = 1e-3
#f = x * x + 4 * x * math.sin(x) + math.cos(x)
# выбор x1 и x2 для оптимального _x
def opt(w, a, b, c, h) :
def weak_conns(graph: BaseGraph) -> List[List[int]]:
"""Поиск компонент слабой связности"""
unvisited = copy.deepcopy(graph.get_all_vertices())
comps = []
while unvisited:
start = unvisited.pop()
comps.append([])
stack = deque([start])
@Kiruha01
Kiruha01 / P.py
Last active April 5, 2021 17:24
SALE
class Permutation(object):
"""
Класс, описывающий перестановку строк в матрице
P - массив перестановки
even - чётность перстановки
1 - чётна
-1 - нечётна
"""
def __init__(self, n):
https://gist.github.com/f11b32d31b99aae01e266f97a7101227
@Kiruha01
Kiruha01 / install.sh
Last active December 8, 2020 22:42
bash for OS lecturers
#!/bin/bash
if [[ ! -e $HOME/bin/ ]]
then
mkdir $HOME/bin/
fi
cp sf $HOME/bin/
echo 'export PATH=$PATH:$HOME/bin/' >> $HOME/.bashrc
source $HOME/.bashrc