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
#include <bits/stdc++.h> | |
using namespace std; | |
int INF = 1e9; | |
string word; | |
vector<vector<pair<char, bool> > > g(7, vector<pair<char, bool> >(7, {'!', true})); |
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 pwn import * | |
def cou(g): | |
if (g == 1): | |
return 2 | |
elif (g == 0): | |
return 1 | |
else: | |
return (cou(g - 1)) + g |
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
#include <iostream> | |
struct Animal | |
{ | |
virtual void Voice() = 0; | |
/*{ | |
std::cout << "Oleg kruto!\n"; | |
}*/ | |
}; |
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
#include <bits/stdc++.h> | |
using namespace std; | |
/* | |
Z Функция - массив длины n, i-ый элемент которого равен наибольшему числу символов, начиная с позиции i, совпадающих с первыми символами строки s. | |
"abacaba" | |
z[0] = 0, |
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
мая 01 08:28:54 keddad-pc gnome-shell[18811]: JS ERROR: Exception in callback for signal: position-changed: TypeError: this._rect is undefined | |
getCurrentRect@resource:///org/gnome/shell/ui/keyboard.js:546:22 | |
wrapper@resource:///org/gnome/gjs/modules/_legacy.js:82:22 | |
_onFocusPositionChanged@resource:///org/gnome/shell/ui/keyboard.js:611:20 | |
wrapper@resource:///org/gnome/gjs/modules/_legacy.js:82:22 | |
_emit@resource:///org/gnome/gjs/modules/signals.js:128:27 | |
_setCurrentWindow/this._currentWindowPositionId<@resource:///org/gnome/shell/ui/keyboard.js:528:21 | |
мая 01 08:28:36 keddad-pc gnome-shell[18811]: JS WARNING: [resource:///org/gnome/shell/ui/keyboard.js 546]: reference to undefined property "_rect" |
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
{'count': 22986, 'items': [{'id': 1598172, 'from_id': -30666517, 'owner_id': -30666517, 'date': 1557072182, 'marked_as_ads': 0, 'post_type': 'post', 'text': 'После майских праздников у весеннего сезона IT-событий откроется второе дыхание: будут и конференции с митапами по всем темам от Data Science до геймдева, и хакатоны с приятными призами.\n\nА сориентироваться во всём этом поможет наша очередная подборка. Бегом читать:', 'is_pinned': 1, 'attachments': [{'type': 'link', 'link': {'url': 'https://m.vk.com/@-30666517-level-up-23', 'title': 'Level Up: события и курсы #23', 'caption': 'm.vk.com', 'description': 'Article', 'photo': {'id': 456328268, 'album_id': -66, 'owner_id': -30666517, 'user_id': 100, 'sizes': [{'type': 'm', 'url': 'https://sun1-88.userapi.com/c852028/v852028060/11b8db/TeHGkJKGV08.jpg', 'width': 130, 'height': 87}, {'type': 'o', 'url': 'https://sun1-14.userapi.com/c852028/v852028060/11b8e0/sYivVc3_XII.jpg', 'width': 130, 'height': 87}, {'type': 'p', 'url': 'https://sun1-30.userapi.com/c852028 |
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 parsedoc(url): | |
page = urlopen(Request(url, headers={'User-Agent': 'Mozilla'})) | |
soup = BeautifulSoup(page, features="html.parser") | |
for div in soup.find_all("div", {'id': "comments"}): | |
div.decompose() | |
for footer in soup.find_all("footer", {'id': "footer"}): | |
footer.decompose() | |
code = len(soup.find_all('code')) | |
img = len(soup.find_all('img')) | |
clean = soup.find('time') |
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 stem import Signal | |
from stem.control import Controller | |
import requests | |
from multiprocessing.dummy import Pool as ThreadPool | |
class SafeGetter: |
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
{ | |
"team1" : { | |
"id": 1, | |
"top": 16, | |
"players": [30, 3, 8, 11, 3] | |
}, | |
"team2" : { | |
"id": 3, # id команды | |
"top": 38, | |
"players": [2, 4, 5, 7, 10] # 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
# Алгоритм Евклида | |
Задача: Вычисление НОД | |
$$ | |
gcd(a,b) = | |
\begin{cases} | |
a & \quad b=0\\ | |
gcd(b, a \text{ mod } b) & \quad \text{otherwise} | |
\end{cases} | |
$$ | |
``` c++ |
OlderNewer