Skip to content

Instantly share code, notes, and snippets.

View nbingham1's full-sized avatar

Ned Bingham nbingham1

View GitHub Profile
@nbingham1
nbingham1 / dict.txt
Last active December 31, 2017 20:26
A fairly clean dictionary for NLP
a The first letter of the English and of many other alphabets. The capital A of the alphabets of Middle and Western Europe, as also the small letter a), besides the forms in Italic, black letter, etc., are all descended from the old Latin A, which was borrowed from the Greek Alpha, of the same form; and this was made from the first letter of the Phoenician alphabet, the equivalent of the Hebrew Aleph, and itself from the Egyptian origin. The Aleph was a consonant letter, with a guttural breath sound that was not an element of Greek articulation; and the Greeks took it to represent their vowel Alpha with the a sound, the Phoenician alphabet having no vowel symbols.
a The name of the sixth tone in the model major scale that in C), or the first tone of the minor scale, which is named after it the scale in A minor. The second string of the violin is tuned to the A in the treble staff. A sharp is the name of a musical tone intermediate between A and B. A flat is the name of a tone intermediate between A and G.
a
@nbingham1
nbingham1 / interface.cpp
Created November 30, 2017 02:48
Go-like Interfaces in C++
// Taken from here:
// http://wall.org/~lewis/2012/07/23/go-style-interfaces-in-cpp.html
//
// Some of the code didn't render correctly on the site, here is a full compilable version.
#include <stdlib.h>
#include <stdio.h>
using namespace std;

Keybase proof

I hereby claim:

  • I am nbingham1 on github.
  • I am nbingham (https://keybase.io/nbingham) on keybase.
  • I have a public key ASA49TeR3QZK-DEvFQ4Jo1VTftlas8hxF2xNoYRY-aSAaAo

To claim this, I am signing this object:

@nbingham1
nbingham1 / Combine Histories.txt
Last active June 16, 2017 03:59
Tack the history of one repository onto another
# two repositories r1 and r2
# r2 was created by manually copying the files from r1 without preserving history
# so r2 and r1 don't have a common commit
git clone r2 work
cd work
git remote add r1 <path_to_r1>
git fetch r1
git checkout -b r1_master r1/master
git checkout master
@nbingham1
nbingham1 / inject_exif.py
Created January 4, 2017 20:30
Re-inject exif metadata into photos in a facebook archive
#!/usr/bin/python
from HTMLParser import HTMLParser
from PIL import Image
import piexif
import datetime
import sys
from fractions import Fraction
def rational(s):
f = Fraction(s).limit_denominator(10000000)
@nbingham1
nbingham1 / ti_84_graph3d
Created October 5, 2015 00:03
A 3D function grapher for the TI-84
-10->N
1000->F
ZStandard
ZSquare
5->C
a+bi
Lbl 1
ClrHome
Menu("GRAPH 3D","GRAPH FUNCTION",2,"WINDOW",3,"ROTATE",4,"MATH",5,"QUIT",6)
@nbingham1
nbingham1 / ti_84_brick
Created October 5, 2015 00:01
Brick for the TI-84
ClrHome
ClrDraw
AxesOff
2->Theta
3->L
2->Q
3->O
3->U
-3->V
[[24,22,23,25,26,23,22,24][21,21,21,21,21,21,21,21][0,0,0,0,0,0,0,0][0,0,0,0,0,0,0,0][0,0,0,0,0,0,0,0][0,0,0,0,0,0,0,0][11,11,11,11,11,11,11,11][14,12,13,15,16,13,12,14]]->[B]
0->D
0->Ymin
62->Ymax
0->Xmin
94->Xmax
ClrDraw
RecallPic Pic2
0->S
@nbingham1
nbingham1 / ti_84_snake
Last active October 4, 2015 23:55
Snake for the TI-84
0->X
0->Y
1->L
pi/2->A
0->R
2->M
0->D
0->E
0->F
cos(pi/2)*M->S