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
;; make the following change to undo so that the user sees 'Undo!' | |
;; instead of 'Redo!' in the echo area when running undo-only. | |
;; | |
;; | |
;; | |
;; < (if equiv "Redo in region!" "Undo in region!") | |
;; < (if equiv "Redo!" "Undo!")))) | |
;; --- | |
;; > (if (and equiv (not undo-more)) | |
;; > "Redo in region!" |
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
{ | |
"metadata": { | |
"name": "", | |
"signature": "sha256:8e904721f90a0b0c0c0dd648eb9f9f2473c22dc731e07b4f14c14c1cf2c3df9c" | |
}, | |
"nbformat": 3, | |
"nbformat_minor": 0, | |
"worksheets": [ | |
{ | |
"cells": [ |
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
{ | |
"metadata": { | |
"name": "", | |
"signature": "sha256:8e904721f90a0b0c0c0dd648eb9f9f2473c22dc731e07b4f14c14c1cf2c3df9c" | |
}, | |
"nbformat": 3, | |
"nbformat_minor": 0, | |
"worksheets": [ | |
{ | |
"cells": [ |
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
cat cat.js | |
#!/usr/bin/env node | |
var fs = require('fs'); | |
var readline = require('readline'); | |
var rl = readline.createInterface({ | |
input: process.stdin, | |
output: process.stdout, | |
terminal: false |
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
$cat parse-json.js | |
#!/usr/bin/env node | |
var readline = require('readline'); | |
var rl = readline.createInterface({ | |
input: process.stdin, | |
output: process.stdout, | |
terminal: false | |
}); |
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
{ | |
"metadata": { | |
"name": "", | |
"signature": "sha256:ad9def6cd2562187051a60bccf190018c12b68225779c07fe4622ad0800536cb" | |
}, | |
"nbformat": 3, | |
"nbformat_minor": 0, | |
"worksheets": [ | |
{ | |
"cells": [ |
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
### Keybase proof | |
I hereby claim: | |
* I am clarkgrubb on github. | |
* I am clarkgrubb (https://keybase.io/clarkgrubb) on keybase. | |
* I have a public key whose fingerprint is 8A7A 4632 8348 247F C4F9 8473 34E1 8684 4526 9D1B | |
To claim this, I am signing this object: |
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 python3 | |
import sys | |
from numpy import mean, log | |
from scipy.special import digamma, polygamma | |
import scipy.stats as stats | |
# Estimate Gamma parameters using MLE. Algorithm described here: | |
# | |
# http://research.microsoft.com/en-us/um/people/minka/papers/minka-gamma.pdf |
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
$ cat ./hash_dict.py | |
#!/usr/bin/env python3 | |
import hashlib | |
import json | |
def hash_dict(data): | |
m = hashlib.sha1() | |
m.update(json.dumps(data, sort_keys=True).encode('utf-8')) | |
return m.hexdigest()[:12] |
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
$ cat zoo.quizzes.json | jq -r '.quiz.metadata.quizLink' | sed $'s/./&\\\n/g' | awk '{cnt[$0] += 1} END {for (i in cnt) print cnt[i], i}' | sort -nr | |
22105 - | |
13265 e | |
9753 o | |
9501 a | |
7662 t | |
7502 r | |
7352 i | |
7274 h | |
6593 s |