Skip to content

Instantly share code, notes, and snippets.


Neal McBurnett nealmcb

View GitHub Profile
nealmcb /
Created Mar 18, 2015
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 / LearningSparkCh03.ipynb
Last active Aug 29, 2015
IPython Notebook with examples, and TypeError, in Learning Spark book dated 2015-03-27: "Second Release"
View LearningSparkCh03.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View pack.rb
# just playing
def self.pkg(platform, opt)
# short time solution <start>
extension = case platform
when "win32" then
when "linux" then
when "osx" then
nealmcb /
Created Oct 7, 2009
Convert ranked ballots from the CSV format provided by CIVS to BLT
#!/usr/bin/env python
"""Convert ranked ballots from the CSV format provided by CIVS
( to the BLT format
used by, e.g., OpenSTV (
TODO: support the popular "text" format and equal rankings via the "=" delimiter.
View replicate_trick.r
## Climate analysis R code based on Steve McIntyre's example at
## with some fixes by Neal McBurnett.
## Usage: R --save < replicate_trick.r
## which produces an "" file
# archive is truncated in 1960:”
View fgdb.rb install on ubuntu 10.04
Peter Lyons' notes on installing fgdb (Free Geek Database) from the trunk:
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.
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 /
Created Feb 24, 2012
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
nealmcb /
Last active Jun 16, 2016
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

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 /
Last active Jun 21, 2016 — forked from karpathy/
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.
Saves model every 100 episodes. Resume by setting resume = True
Set render = True to watch the action.
Modified from
to print timestamped self-contained progress rows in TSV format (filter
for just lines containing 'episode').
For background, see
nealmcb / HiddenFiguresMath.ipynb
Last active Jan 24, 2017
Hidden Figures Example: Compressible Flow Equations and Table in Jupyter, Python
View HiddenFiguresMath.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
You can’t perform that action at this time.