Skip to content

Instantly share code, notes, and snippets.

View nealmcb's full-sized avatar

Neal McBurnett nealmcb

View GitHub Profile
@nealmcb
nealmcb / sampling_with_tickets.ipynb
Created June 19, 2018 06:05
Demo of Ron Rivest's Election Audit Sampling with Tickets
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@nealmcb
nealmcb / track_session_inhibitors.py
Created July 16, 2012 05:19
Track and print out the apps and clients that are inhibiting Gnome session actions like log out, user switching, suspending or idle/dpms/screensaver, under Linux.
#!/usr/bin/python
"""
Print out the apps and clients that are inhibiting session actions like log out, user switching, suspending or idle.
%InsertOptionParserUsage%
Example:
track_session_inhibitors &
Todo:

Keybase proof

I hereby claim:

  • I am nealmcb on github.
  • I am nealmcb (https://keybase.io/nealmcb) on keybase.
  • I have a public key whose fingerprint is EDC0 36EB 2397 A000 D7CD 417B B94C 992F 3314 8156

To claim this, I am signing this object:

sudo apt-get update && sudo apt-get install mycroft-core
Hit http://mirrordirector.raspbian.org jessie InRelease
Hit http://archive.raspberrypi.org jessie InRelease
Hit http://mirrordirector.raspbian.org jessie/main armhf Packages
Hit http://archive.raspberrypi.org jessie/main armhf Packages
Hit http://repo.mycroft.ai debian InRelease
Hit http://mirrordirector.raspbian.org jessie/contrib armhf Packages
Hit http://mirrordirector.raspbian.org jessie/non-free armhf Packages
Hit http://archive.raspberrypi.org jessie/ui armhf Packages
Hit http://mirrordirector.raspbian.org jessie/rpi armhf Packages
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.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@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.
@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 / 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: