Skip to content

Instantly share code, notes, and snippets.

#include <iostream>
#include <vector>
#include <set>
#include <boost/iterator/counting_iterator.hpp>
#include <algorithm>
#include <functional>
typedef std::vector<int> int_vec;
typedef std::set<int> int_set;
@tilarids
tilarids / task_1_1.ml
Created March 21, 2012 10:11
Solution for coursera's Cryptography programming task 1.1
open Batteries_uni
let regroup e n =
let next () =
if Enum.is_empty e then
raise Enum.No_more_elements
else
Enum.take n e in Enum.from next;;
let load_ciphers fname =
open Batteries_uni;;
let get_hash x = let s = Cryptokit.Hash.sha256 () in
begin
s#add_string x;
s#result
end;;
let lsb x n =
let complete_bytes_count = n / 8 in
@tilarids
tilarids / Makefile
Created May 23, 2012 20:48
Simplest 'static blog generator' concept
# SRC should be specified
OUTPUT_FILES=$(shell find ${SRC} -type f -exec echo {}.html \;)
all: ${OUTPUT_FILES}
echo "All is done"
%.md.html : %.md
python -c "import markdown; md = markdown.Markdown(extensions=['meta']); md.convertFile('$^', '$@')"
@tilarids
tilarids / log.txt
Created October 8, 2012 11:50
Repo with grafted change
o changeset: 1:6c03dec0bcf6
| tag: tip
| user: Sergey Kishchenko <sergey.kishchenko@quickoffice.com>
| date: Mon Oct 08 14:33:43 2012 +0300
| summary: file.txt was fixed
|
| diff -r 6fb9917bb523 -r 6c03dec0bcf6 file.txt
| --- a/file.txt Mon Oct 08 13:36:59 2012 +0300
| +++ b/file.txt Mon Oct 08 14:33:43 2012 +0300
| @@ -1,2 +1,2 @@
@tilarids
tilarids / log.txt
Created October 8, 2012 11:51
Repo with changes
@ changeset: 3:927d19ecf38e
| tag: tip
| user: Sergey Kishchenko <sergey.kishchenko@quickoffice.com>
| date: Mon Oct 08 14:34:17 2012 +0300
| summary: file.txt was fixed again
|
| diff -r f2f4866c5fa1 -r 927d19ecf38e file.txt
| --- a/file.txt Mon Oct 08 14:33:43 2012 +0300
| +++ b/file.txt Mon Oct 08 14:34:17 2012 +0300
| @@ -1,3 +1,3 @@
/*
gcc camera-shot.c -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include/ -I/usr/include/clutter-gtk-1.0 -I /usr/include/gtk-3.0/ -I /usr/include/pango-1.0 -I /usr/include/cairo/ -I /usr/include/gdk-pixbuf-2.0 -I /usr/include/atk-1.0 -I /usr/include/clutter-1.0 -I /usr/include/cogl -I /usr/include/json-glib-1.0 -I /usr/include/gstreamer-0.10/ -I /usr/include/libxml2 -I /usr/include/cheese -lcheese -lgtk-3 -lclutter-gtk-1.0 -o camera-shot
*/
#define HAVE_DLFCN_H 1
#define HAVE_INTTYPES_H 1
#define HAVE_MEMORY_H 1
#define HAVE_STDINT_H 1
#define HAVE_STDLIB_H 1
#define HAVE_STRINGS_H 1
@tilarids
tilarids / voting_writeup.ipynb
Created June 24, 2016 03:46
Анализ голосования в Совет общественного контроля при НАБУ
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

Vanilla policy gradients with ValueFunction to estimate value for the specific state (I use current observation, previous observation and previous action as a state). This same algorithm works fine without ValueFunction if you don't stop the learning process at step 200 and continue learning after that. OpenAI Gym's monitor stops the game at step 200 so you can't use monitor at the same time as training on more than 200 steps.

Reproducing:

@tilarids
tilarids / .gitignore
Last active July 7, 2016 18:00
Testbed for C++ serialization
main
main.dSYM/