Skip to content

Instantly share code, notes, and snippets.

View nealmcb's full-sized avatar

Neal McBurnett nealmcb

View GitHub Profile
@nealmcb
nealmcb / xkcd-greek-t-shirt.md
Created March 18, 2015 17:25
XKCD Greek t-shirt, with mathematical, scientific and engineering uses for greek letters

xkcd has some great t-shirts in the xkcd store. One of them, which I got in late 2014, is the uber-geeky "greek" shirt, though I don't see it in the official store right now.

For background, see Greek letters used in mathematics, science, and engineering (Wikipedia), though that doesn't have all the uses listed by Randall.

Here are the letters and uses presented on the shirt, row-by-row:

δ  delta: dirac & kronecker deltas; isotope ratio
ε  epsilon: a small number; strain; permittivity
ψ  psi: quantum wavefunction, the planet Neptune

η eta: impedance, viscosity, efficiency

@nealmcb
nealmcb / LearningSparkCh03.ipynb
Last active August 29, 2015 14:19
IPython Notebook with examples, and TypeError, in Learning Spark book dated 2015-03-27: "Second Release"
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@nealmcb
nealmcb / pack.rb
Created August 25, 2009 21:37 — forked from vsalbaba/pack.rb
# just playing
def self.pkg(platform, opt)
# short time solution <start>
extension = case platform
when "win32" then
"exe"
when "linux" then
"run"
when "osx" then
"dmg"
## Climate analysis R code based on Steve McIntyre's example at
## http://camirror.wordpress.com/2009/11/29/replicating-the-trick-diagram/#more-130
## with some fixes by Neal McBurnett.
## Usage: R --save < replicate_trick.r
## which produces an "Rplots.ps" file
##COMPARE ARCHIVED BRIFFA VERSION TO CLIMATEGATE VERSION#
#1. LOAD BRIFFA (CLIMATEGATE VERSION)
# archive is truncated in 1960: ftp://ftp.ncdc.noaa.gov/pub/data/paleo/treering/reconstructions/n_hem_temp/briffa2001jgr3.txt”
Peter Lyons' notes on installing fgdb (Free Geek Database) from the trunk:
git://git.freegeek.org:/git/fgdb.rb
Note that after running into some problems with that, we tried using the one at github which is close to version 1.0.30 of the main project, and that has been working better.
http://wiki.github.com/markstos/fgdb.rb/
But for the record, here is the procedure we tried for the trunk version (about version 1.0.50):
-Installed Ubuntu Server 10.04 amd64 (Lucid)
@nealmcb
nealmcb / testkernel.py
Created February 24, 2012 05:16
testkernel: automate many linux kernel testing steps - great for a git bisect
#!/usr/bin/env python
"""
The testkernel command does these things to make linux kernel testing easy:
looks in the indicated folder on the web
downloads the .deb files for the kernel of the given type
installs them locally
configures grub2 to reboot to the given kernel on the next reboot
TODO:
@nealmcb
nealmcb / README.md
Last active June 16, 2016 05:38
OpenAI cartpole evaluation ala iaroslav-ai

This gist documents my OpenAI evaluations at

I attempted to reproduce the quickest documented CartPole-v0 solution to-date, reporting 29 episodes to solve,by iaroslav-ai, documented at https://gym.openai.com/evaluations/eval_yCJkgBGRl2Nfn3TKbvkkg

I don't know why I had a different result the first time, or indeed why it was faster the second time.

I also saw it fail with a traceback:

@nealmcb
nealmcb / pg-pong.py
Last active June 21, 2016 03:48 — forked from karpathy/pg-pong.py
Training a Neural Network ATARI Pong agent with Policy Gradients from raw pixels
"""pg-pong.py: Trains an agent with (stochastic) Policy Gradients on Pong.
Uses OpenAI Gym.
Saves model every 100 episodes. Resume by setting resume = True
Set render = True to watch the action.
Modified from https://gist.github.com/karpathy/a4166c7fe253700972fcbc77e4ea32c5
to print timestamped self-contained progress rows in TSV format (filter
for just lines containing 'episode').
For background, see http://karpathy.github.io/2016/05/31/rl/
@nealmcb
nealmcb / HiddenFiguresMath.ipynb
Last active January 24, 2017 17:42
Hidden Figures Example: Compressible Flow Equations and Table in Jupyter, Python
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.