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
%%% @author Sergey Prokhorov <me@seriyps.ru> | |
%%% @copyright (C) 2013, Sergey Prokhorov | |
%%% @doc | |
%%% @license Apache License Version 2.0 | |
%%% | |
%%% Walker alias method - efficient random selection with defined probabilities. | |
%%% <http://en.wikipedia.org/wiki/Alias_method> | |
%%% | |
%%% > ProbabilityValueList = [{10, a}, {20, b}, {30, c}, {40, d}], | |
%%% > WalkerVectors = walker_alias:build(ProbabilityValueList), |
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
# -*- coding: utf-8 -*- | |
''' | |
Created on 2012-10-07 | |
@author: Sergey <me@seriyps.ru> | |
Альтернативный вариант решения из статьи http://habrahabr.ru/post/153595/ | |
на базе модификации AST | |
@asynchronous |
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
# -*- coding: utf-8 -*- | |
''' | |
Created on 2012-09-24 | |
@author: Sergey <me@seriyps.ru> | |
How to test: | |
$ head -c 100M /dev/urandom > static_file.bin | |
$ python |
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
#!/usr/bin/python | |
# -*- coding: utf-8 -*- | |
''' | |
Created on 2012-06-03 | |
@author: Sergey Prokhorov <me@seriyps.ru> | |
Скрипт для создания архива, содержащего все пакеты, необходимые для оффлайн | |
установки l2tp плагина NetworkManager на Ubuntu. | |
''' |
NewerOlder