{{ message }}

Instantly share code, notes, and snippets.

# Konstantinpodshumok

• Russia / Moscow
Last active Aug 29, 2015
Short quicksort in python
View quicksort.py
 import random; import operator; from six.moves import range, reduce def swap(arr, iv, ip, dir): if iv == ip + dir: arr[iv], arr[ip] = arr[ip], arr[iv] else: arr[iv], arr[ip + dir], arr[ip] = arr[ip + dir], arr[ip], arr[iv] shift = lambda (cmp, dir, arr, ip), iv: (cmp, dir, arr, ip) if cmp(arr[iv], arr[ip]) else (swap(arr, iv, ip, dir) or (cmp, dir, arr, ip + dir)) def qs(arr, bgn=0, end=None): if end is None: end = len(arr) - 1 - bgn if end - bgn < 1: return arr ip = bgn if end - bgn == 1 else random.randint(bgn + 1, end - 1) _, _, _, ipl = reduce(shift, range(ip - 1, bgn - 1, -1), (operator.le, -1, arr, ip))
Last active Aug 29, 2015
View make_dag.cpp
 #include #include #include #include using std::pair; using std::make_pair; using std::unordered_set; using std::vector; using std::stack;
Last active Aug 29, 2015
 #include #include #include #include #include #include #include #include #include
Created Sep 8, 2014
Leaked yandex passwords w/o logins sorted by popularity
We can't make this file beautiful and searchable because it's too large.
 password count 123456 39177 123456789 13892 111111 9826 qwerty 7926 1234567890 5853 1234567 4668 7777777 4606 123321 4324
Created Sep 8, 2014
Leaked mail.ru passwords w/o logins sorted by popularity
We can't make this file beautiful and searchable because it's too large.
 password count qwertyuiop 24105 qwe123 19975 qwerty 14266 qweqwe 6084 123456 4541 1q2w3e4r 3245 1qaz2wsx 3122 1q2w3e 2383
Created Sep 10, 2014
Leaked gmail passwords w/o login sorted by popularity
View gmail_full.csv
We can't make this file beautiful and searchable because it's too large.
 passw count 123456 47817 password 11548 123456789 11133 12345 8088 qwerty 5915 12345678 5248 111111 3514 abc123 3011
Created Sep 16, 2014
top twitter users 14.09.2014, Russia
View users.csv
We can't make this file beautiful and searchable because it's too large.
 "user__screen_name" "user__created_at" "user__default_profile" "user__default_profile_image" "user__description" "user__favourites_count" "user__followers_count" "user__friends_count" "user__geo_enabled" "user__id" "user__is_translator" "user__lang" "user__listed_count" "user__location" "user__name" "user__profile_background_color" "user__profile_background_image_url" "user__profile_background_image_url_https" "user__profile_background_tile" "user__profile_banner_url" "user__profile_image_url" "user__profile_image_url_https" "user__profile_link_color" "user__profile_sidebar_border_color" "user__profile_sidebar_fill_color" "user__profile_text_color" "user__profile_use_background_image" "user__statuses_count" "user__time_zone" "user__url" "user__utc_offset" "user__verified" "monitored_statuses_count" "source_name" "top_words"
Created Sep 20, 2014
Twitter spamers for 2014.09.14 (Moscow)
View raw_spamers14.09.2014.json
This file has been truncated, but you can view the full file.
 [ [ "1410914432.14", { "contributors": null, "truncated": false, "text": "\u041c\u043e\u0441\u043a\u0432\u0430\u0412\u044b\u0431\u0438\u0440\u0430\u0435\u0442 http://t.co/PIDgIXrx2z", "in_reply_to_status_id": null, "id": 512037172300746753,
Last active Sep 17, 2015
PyCon Russia 2015 talk on setup.py
View setup.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Last active Dec 22, 2015
Насколько я понял, КОИБы сохраняют изображение опущенного бюллетеня. Имя файла при этом содержит текущее время. Таким образом, имея видеозапись и флешку (контрольный носитель информации), можно узнать кто как проголосовал
View koib-image-filename.cs
 /// /// Получить имя файла для сохранения изображения /// /// префикс имени файла /// StringBuilder, в который уже записано имя файла private StringBuilder GetImageFileName(string filePrefix) { Logger.LogVerbose(Message.DebugVerbose, "call"); var fileName = new StringBuilder();
You can’t perform that action at this time.