Skip to content

Instantly share code, notes, and snippets.

@tilarids
tilarids / mpd.ipynb
Last active April 19, 2018 16:33
Maddison's historical data toy analysis
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@tilarids
tilarids / tf.py
Last active March 22, 2017 04:32
tf vs theano (simple example)
import tensorflow as tf
import numpy as np
trX = np.linspace(-1, 1, 1001, dtype=np.float32)
trY = 2 * trX + np.random.randn(*trX.shape).astype(np.float32) * 0.33
EPOCHS = 1000
CAP = 1000
queue_xy = tf.train.input_producer(tf.pack([trX, trY], axis=1), shuffle=False, capacity=CAP, num_epochs=EPOCHS)
@tilarids
tilarids / tiny_hello.asm
Created September 23, 2016 00:49
A minimal Mach-o x32 executable for OS X El Capitan (with proper padding and symtable)
; A minimal Mach-o x32 executable for OS X El Capitan (with proper padding and symtable)
;
; Original (pre 10.10.5) version - https://gist.github.com/softboysxp/1084476
; $ nasm -O0 -f bin -o tiny_hello tiny_hello.asm
; $ chmod +x tiny_hello
; $ ./tiny_hello
; (returns 42)
; $
; c.f.
@tilarids
tilarids / query_demo.ipynb
Created September 10, 2016 15:19
JSON + Pandas query demo
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@tilarids
tilarids / README
Last active August 30, 2016 03:05
Policy Gradients (with & without TRPO).
More details and reproducing: https://github.com/tilarids/reinforcement_learning_playground
This specific commit was using to reproduce this: https://github.com/tilarids/reinforcement_learning_playground/commit/fd442e78ee4c93dfa38a3e83677b3d3cb3eefc90
TRPO (described in http://arxiv.org/abs/1502.05477) with an additional neural network to predict value (used for advantage calculation).
More details and steps to reproduce: https://github.com/tilarids/reinforcement_learning_playground
Commit used to produce the result: https://github.com/tilarids/reinforcement_learning_playground/commit/df2b1c68735f31c6ed2b943a1e0309385b53cd0e
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@tilarids
tilarids / tf_regression.py
Last active July 19, 2016 22:01
Minimized TensorFlow regression model
import os.path
import time
import numpy as np
import tensorflow as tf
from tensorflow.python.training import saver as saver_lib
from tensorflow.python.training import summary_io
# Basic model parameters as external flags.
@tilarids
tilarids / .gitignore
Last active July 7, 2016 18:11
Simple serialize implementation for discussion
main
main.dSYM/
@tilarids
tilarids / .gitignore
Last active July 7, 2016 18:00
Testbed for C++ serialization
main
main.dSYM/