Skip to content

Instantly share code, notes, and snippets.

Konstantin Podshumok podshumok

Block or report user

Report or block podshumok

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
podshumok /
Last active Aug 29, 2015
Short quicksort in python
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))
View make_dag.cpp
#include <utility>
#include <unordered_set>
#include <vector>
#include <stack>
using std::pair;
using std::make_pair;
using std::unordered_set;
using std::vector;
using std::stack;
View thread_pool.cpp
#include <iostream>
#include <vector>
#include <queue>
#include <memory>
#include <atomic>
#include <chrono>
#include <thread>
#include <mutex>
#include <condition_variable>
podshumok / yandex_passwords_sorted.csv
Created Sep 8, 2014
Leaked yandex passwords w/o logins sorted by popularity
View yandex_passwords_sorted.csv
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
podshumok / mail_passwords_sorted.csv
Created Sep 8, 2014
Leaked passwords w/o logins sorted by popularity
View mail_passwords_sorted.csv
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
podshumok / gmail_full.csv
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
podshumok / users.csv
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"
podshumok / raw_spamers14.09.2014.json
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.
"contributors": null,
"truncated": false,
"text": "\u041c\u043e\u0441\u043a\u0432\u0430\u0412\u044b\u0431\u0438\u0440\u0430\u0435\u0442",
"in_reply_to_status_id": null,
"id": 512037172300746753,
podshumok / setup.ipynb
Last active Sep 17, 2015
PyCon Russia 2015 talk on
View setup.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
podshumok / koib-image-filename.cs
Last active Dec 22, 2015
Насколько я понял, КОИБы сохраняют изображение опущенного бюллетеня. Имя файла при этом содержит текущее время. Таким образом, имея видеозапись и флешку (контрольный носитель информации), можно узнать кто как проголосовал
View koib-image-filename.cs
/// <summary>
/// Получить имя файла для сохранения изображения
/// </summary>
/// <param name="filePrefix">префикс имени файла</param>
/// <returns>StringBuilder, в который уже записано имя файла</returns>
private StringBuilder GetImageFileName(string filePrefix)
Logger.LogVerbose(Message.DebugVerbose, "call");
var fileName = new StringBuilder();
You can’t perform that action at this time.