Skip to content

Instantly share code, notes, and snippets.

@akzaidi
akzaidi / iterm2.md
Last active February 1, 2016 20:08
iterm2 cheatsheet

Tabs and Windows

Function Shortcut
Previous Tab + Left Arrow
Next Tab + Right Arrow
Go to Tab + Number
Go to Window + Option + Number
Go to Split Pane by Direction + Option + Arrow
Go to Split Pane by Order of Use + ] , + [
@akzaidi
akzaidi / pg-pong.py
Created June 10, 2016 18:38 — forked from karpathy/pg-pong.py
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
@akzaidi
akzaidi / README.md
Created August 3, 2016 18:54 — forked from yihui/README.md
A Shiny app based on annyang that responds to voice input

See https://yihui.shinyapps.io/voice for the live demo. Make sure you have turned on your microphone and allow the web browser to have access to it. Credits go to annyang and also to @wch for showing me a minimal Shiny example. You can do four things on the scatterplot using your voice input:

  • say "title something" to change the plot title, e.g. title good morning
  • say "color a color name" to change the color, e.g. color blue
  • say "bigger" or "smaller" to change the size of points
  • say "regression" to add a linear regression line
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.