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
#!/usr/bin/env bash | |
# use /usr/bin/env bash instead of /bin/bash | |
# because some folks use BSD | |
# use set -e instead of #!/bin/bash -e in case we're | |
# called with `bash ~/bin/scriptname` | |
set -e # bail out early if any command fails | |
set -u # fail if we hit unset variables | |
set -o pipefail # fail if any component of any pipe fails |
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
if [ ! -f .env ] | |
then | |
export $(cat .env | xargs) | |
fi |
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
<!DOCTYPE html> | |
<meta charset="utf-8"> | |
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/KaTeX/0.6.0/katex.min.css"> | |
<script src="https://cdnjs.cloudflare.com/ajax/libs/KaTeX/0.6.0/katex.min.js"></script> | |
<style> | |
.equation { | |
font-size: 20px; | |
text-align: left; | |
margin: 30px 0; | |
margin-left: 5cm; |
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 |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
from csv import DictWriter | |
from glob import glob | |
from ofxparse import OfxParser | |
DATE_FORMAT = "%m/%d/%Y" | |
def write_csv(statement, out_file): | |
print "Writing: " + out_file | |
fields = ['date', 'payee', 'debit', 'credit', 'balance'] | |
with open(out_file, 'w') as f: |
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
% We are generating HTML + MathML code | |
\Preamble{xhtml,mathml} | |
% We don't want to translate font suggestions with ugly wrappers like | |
% <span class="cmti-10"> for italic text | |
\NoFonts | |
% Don't output xml version tag | |
\Configure{VERSION}{} |
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
{-# LANGUAGE GADTs, TypeFamilies, TypeOperators, ScopedTypeVariables, TupleSections, NoImplicitPrelude #-} | |
import Data.Category | |
import Data.Category.Product | |
import Data.Category.Functor | |
import Data.Category.Monoidal | |
import Data.Category.Limit ((***)) | |
import Data.Either | |
import Data.Void |
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
/* | |
* I add this to html files generated with pandoc. | |
*/ | |
html { | |
font-size: 100%; | |
overflow-y: scroll; | |
-webkit-text-size-adjust: 100%; | |
-ms-text-size-adjust: 100%; | |
} |