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
# -*- coding: utf-8 -*- | |
import BaseHTTPServer | |
import requests | |
from bs4 import BeautifulSoup | |
import string | |
HOST = '' | |
PORT = 8232 |
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
var PERPAGE=50, | |
CSV_SEPARATOR=';', // если в Excel криво отображается табличка, то заменить на «,» | |
getResults = function(page, onDone) { | |
$.post('http://bezbanka.ru/search/searchresults/', { | |
'IsShow':1, | |
'Parameters.IsCreditor':'True', | |
'Parameters.IsMonth':'True', | |
'Parameters.MinAmount':'', | |
'Parameters.MaxAmount':'', | |
'Parameters.MinDuePeriod':'', |
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
// Рецепт, как скачать всё состояние биржи WT от https://vk.com/smee_again | |
// 1. открываем Google Chrome, заходим на ЛЮБУЮ страницу webtransfer (должны быть залогинены) | |
// 2. заходим в Меню -> Просмотр -> Разработчикам -> Консоль Javascript | |
// 3. вставляем сюда ВСЁ вот это, жмём ENTER, и ждём несколько секунд: | |
var PERPAGE=100500, | |
//WT_URL = 'https://webtransfer-finance.com/ru/account/ajax_user/applications_table/1/', // «Дать кредит» | |
WT_URL = 'https://webtransfer-finance.com/ru/account/ajax_user/applications_table/2/', // «Получить кредит» | |
CSV_SEPARATOR=';'; // если в Excel криво отображается табличка, то заменить на «,» | |
$.post(WT_URL, {"per_page": PERPAGE, "offset": 0, "search": "", "filter": "", "order[id]": "desc"}, function(r) { | |
var csvContent = [ // это названия столбцов в файле. Можно переименовывать по вкусу: |
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
1 using System; | |
2 class Solution { | |
3 public int solution(int[] A) { | |
4 int n = A.Length; | |
5 int[] L = new int[n + 1]; | |
6 L[0] = -1; | |
7 for (int i = 0; i < n; i++) { | |
8 L[i + 1] = A[i]; | |
9 } | |
10 int count = 0; |
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/python | |
import psycopg2 | |
import urllib2 | |
import base64 | |
KEY = "OmMaNiPadMeHumPokemonchick" | |
class Db(): |
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/python | |
import psycopg2 | |
def GetListInSQL(): | |
try: | |
conn = psycopg2.connect(database="db1023250_fssip", user="u1023250_fssip", password="ampersantPiNgVi237m273", host="77.221.130.141", port="5432") | |
print "Open connection" | |
except: | |
print "WARNING! I can't open connection" | |
cur = conn.cursor() |
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
class LargePaginator(Paginator): | |
def _get_page(self, *args, **kwargs): | |
return LargePage(*args, **kwargs) | |
class LargePage(Page): | |
HELLIP = None | |
def pages_to_show(self): |
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
<?php | |
// Работаем в корневой директории | |
chdir ('../../'); | |
require_once('payment/Futubank/futubank_core.php'); | |
require_once('api/Simpla.php'); | |
class SimplaCallbackHandler extends AbstractFutubankCallbackHandler { | |
private $simpla; | |
private $method; |
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 flatten(dictionary): | |
""" | |
>>> flatten({}) | |
{} | |
>>> flatten({ | |
... "name": { | |
... "first": "One", | |
... "last": "Drone", | |
... }, | |
... "job": "scout", |
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/python | |
import sys | |
import re | |
def main(): | |
if len(sys.argv) == 1: | |
sys.stderr.write('Usage: {} <file> <file> ...\n'.format(sys.argv[0])) | |
sys.exit(1) |