Skip to content

Instantly share code, notes, and snippets.

Avatar

Neal McBurnett nealmcb

View GitHub Profile
@karpathy
karpathy / pg-pong.py
Created May 30, 2016
Training a Neural Network ATARI Pong agent with Policy Gradients from raw pixels
View pg-pong.py
""" Trains an agent with (stochastic) Policy Gradients on Pong. Uses OpenAI Gym. """
import numpy as np
import cPickle as pickle
import gym
# hyperparameters
H = 200 # number of hidden layer neurons
batch_size = 10 # every how many episodes to do a param update?
learning_rate = 1e-4
gamma = 0.99 # discount factor for reward
@rdhyee
rdhyee / spark_docker_mesos.md
Created Jan 17, 2015
What I'm planning to work on during the Data Science / Docker hackday at Wise.io (2015.01.18)
View spark_docker_mesos.md

This is pretty much what I had intended to work on. Specifically I'd like to get the docker images that package up spark in the ipython/scipyserver docker image (https://github.com/rdhyee/ipython-spark/blob/master/Dockerfile) to run on a Mesos cluster. Of relevance is a Spark PR that seems almost ready to go: apache/spark#3074 (combined with https://issues.apache.org/jira/browse/SPARK-2691). If we get the basics working, I'd love to work such integration with https://github.com/rgbkrk/cloudpipe, which I understand to be a hybrid of http://www.multyvac.com/ (I loved its predecessor: picloud) + tmpnb (https://lambdaops.com/ipythonjupyter-tmpnb-debuts/). Wonderful to be able to let people spin up a temporary Jupyter notebook that can run Spark and also be based on an arbitrary docker image.

@datagrok
datagrok / gist:2199506
Last active Sep 22, 2020
Virtualenv's `bin/activate` is Doing It Wrong
View gist:2199506
@nealmcb
nealmcb / testkernel.py
Created Feb 24, 2012
testkernel: automate many linux kernel testing steps - great for a git bisect
View testkernel.py
#!/usr/bin/env python
"""
The testkernel command does these things to make linux kernel testing easy:
looks in the indicated folder on the web
downloads the .deb files for the kernel of the given type
installs them locally
configures grub2 to reboot to the given kernel on the next reboot
TODO:
You can’t perform that action at this time.