— Clone repository with submodules automatically:
git clone --recursive [email protected]:name/repo.git
— Initialize submodules after regular cloning:
— Clone repository with submodules automatically:
git clone --recursive [email protected]:name/repo.git
— Initialize submodules after regular cloning:
$ uname -r
""" 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 |
#!/usr/bin/env python | |
""" | |
moonphase.py - Calculate Lunar Phase | |
Author: Sean B. Palmer, inamidst.com | |
Cf. http://en.wikipedia.org/wiki/Lunar_phase#Lunar_phase_calculation | |
""" | |
import math, decimal, datetime | |
dec = decimal.Decimal |
#!/usr/bin/env python | |
# http://en.wikipedia.org/wiki/Lunar_phase#Calculating_phase | |
import math, decimal, datetime | |
dec = decimal.Decimal | |
def position(now=None): | |
if now is None: | |
now = datetime.datetime.now() |