Skip to content

Instantly share code, notes, and snippets.

karpathy /
Created May 30, 2016 22:50
Training a Neural Network ATARI Pong agent with Policy Gradients from raw pixels
""" 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
Aracem / styles.xml
Last active July 11, 2017 15:48
Material Text Styles supported for all version with Appcompat + Calligraphy Library ( ) Material Design recomendations Remember to add the fonts to your source/fonts folder
View styles.xml
<?xml version="1.0" encoding="utf-8"?>
<!-- TextView Empty Base-->
<style name="TextViewBase" parent="android:TextAppearance.Holo.Widget.TextView"/>
<!-- ActionBar Title -->
<style name="CustomActionBarTitleBase" parent="TextAppearance.AppCompat.Widget.ActionBar.Title"/>
<!-- Text Views Default Base -->