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
import com.twitter.scalding._ | |
import com.twitter.algebird.{ MinHasher, MinHasher32, MinHashSignature } | |
/** | |
* Computes similar items (with a string itemId), based on approximate | |
* Jaccard similarity, using LSH. | |
* | |
* Assumes an input data TSV file of the following format: | |
* | |
* itemId userId |
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
How to Create a Mind | |
2013 | |
http://www.amazon.com/How-Create-Mind-Thought-Revealed/dp/0143124048/ | |
Great pop-cogsci book on Kurzweil's pattern recognition theory of mind. AI concepts such as hierarchal-hidden-markov-models and neural nets are discussed. | |
--- | |
Consciousness: An Introduction | |
2003 | |
http://www.amazon.com/Consciousness-Introduction-Susan-Blackmore/dp/019515343X/ |
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
object BenchmarkCommon { | |
import scala.util.Random | |
val DatasetSize = 10000 | |
val Iterations = 10000 | |
val ArrayPoolSize = 1000 | |
val ArrayPool = { | |
def randomArray(): Array[Int] = { | |
val array = new Array[Int](DatasetSize) | |
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
#!/bin/bash | |
# | |
# Installs the previous version of a Homebrew formula | |
# | |
# Usage: brewv formula_name desired_version | |
# | |
# Based on http://stackoverflow.com/questions/3987683/homebrew-install-specific-version-of-formula#9832084 | |
# | |
# Author: Matti Schneider <hi@mattischneider.fr> (http://mattischneider.fr) |