Открой в терминале эту папку и введи
pip install -r requirements.txt
Открой файл config.yml
и введи данные:
<?xml version="1.0" encoding="UTF-8"?> | |
<rss version="2.0"> | |
<channel> | |
<title>NYT > 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> |
<?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 > World > 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> |
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", |
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]) |
class Permutation(object): | |
""" | |
Класс, описывающий перестановку строк в матрице | |
P - массив перестановки | |
even - чётность перстановки | |
1 - чётна | |
-1 - нечётна | |
""" | |
def __init__(self, n): |
https://gist.github.com/f11b32d31b99aae01e266f97a7101227 |
#!/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 |