This file contains hidden or 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
| function notifyServerError() { | |
| swal("Server failed"); | |
| }; | |
| function hidePost(id) { | |
| $('div[data-post-id=' + id + ']').hide("slow"); | |
| }; | |
| var update_url = '/news/update_state'; |
This file contains hidden or 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 bs4 import BeautifulSoup | |
| import requests | |
| from urllib.request import urlretrieve | |
| r = requests.get("http://www.slideshare.net/slideshow/embed_code/41339705") | |
| soup = BeautifulSoup(r.content, "html.parser") | |
| slides = soup.find_all("div", class_="slide") |
This file contains hidden or 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
| "yohedacrstqlkinpmf%gxvz", | |
| "eitusanrmocdlpbvqgfhjxy", | |
| #^^^^^^^^^^ |
This file contains hidden or 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 Counter | |
| def convert(value): | |
| value = str(value) | |
| cnt = Counter(value) | |
| res = [] | |
| for el in cnt: | |
| res.append(el) |
This file contains hidden or 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 find_pairs(array, x): | |
| result = [] | |
| array = sorted(set(array)) | |
| first = 0 | |
| last = len(array) - 1 | |
| while True: | |
| first_el = array[first] |
This file contains hidden or 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
| method: POST | |
| url: http://ya.ru | |
| params: | |
| some-param: bblabla | |
| headers: | |
| X-Some-Header: balbla blabla vla | |
| body: > | |
| { | |
| "just": "some", | |
| "json": 123, |
This file contains hidden or 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
| #!/usr/bin/env python3 | |
| # Should be in pre-commit file without .py extension | |
| from subprocess import call | |
| import sys | |
| import os.path as path | |
| HOOK_LIST_NAME = "pre-commit.list" |
This file contains hidden or 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
| package io.su0.universum.util.fsm; | |
| import java.util.Arrays; | |
| import java.util.HashSet; | |
| import java.util.Map; | |
| import java.util.Objects; | |
| import java.util.Optional; | |
| import java.util.concurrent.CompletableFuture; | |
| import java.util.concurrent.ExecutionException; | |
| import java.util.concurrent.Future; |