This gist has been moved to https://github.com/offchan42/machine-learning-curriculum
Please see that repository instead because you can make pull requests there and later updates will be pushed there too.
===
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
""" 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 |
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
sudo apt-get remove scala-library scala | |
sudo wget www.scala-lang.org/files/archive/scala-2.10.4.deb | |
sudo dpkg -i scala-2.10.4.deb | |
sudo apt-get update | |
sudo apt-get install scala | |
wget http://scalasbt.artifactoryonline.com/scalasbt/sbt-native-packages/org/scala-sbt/sbt/0.12.4/sbt.deb | |
sudo dpkg -i sbt.deb | |
sudo apt-get update | |
sudo apt-get install sbt |
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
## Simple Python module to upload files to Google Drive | |
# Needs a file 'client_secrets.json' in the directory | |
# The file can be obtained from https://console.developers.google.com/ | |
# under APIs&Auth/Credentials/Create Client ID for native application | |
# To test usage: | |
# import google_drive_util | |
# google_drive_util.login() | |
# google_drive_util.test() |