View gist:4913230b8c52d4f7ccce1d0184ae1879
// TODO: #8575, for sid 127, use finer access facet (e.g. "Software" should be "Local Holdings")
// Why isn't result of getFormat ("FormatOrig") passed directly to ""?
// Use switch here?
switch (source_id) {
case "0":
return getFormat(record);
case "3":
  ## ngram following

    # load manually downloaded web of science data dump
    tt <- jsonlite::stream_in(file("data/wos_total.json"), verbose = FALSE) %>% 


Either copy the aliases from the .gitconfig or run the commands in


Easily checkout local copies of pull requests from remotes:

  • git pr 4 - creates local branch pr/4 from the github upstream(if it exists) or origin remote and checks it out
  • git pr 4 someremote - creates local branch pr/4 from someremote remote and checks it out
View mosttags.txt
000 001 002 003 004 005 006 007 008 009 010.a 010.b 010.c 010.d 010.e 010.f 010.g 010.h 010.i 010.j 010.k 010.l 010.m 010.n 010.o 010.p 010.q 010.r 010.s 010.t 010.u 010.v 010.w 010.x 010.y 010.z 010.0 010.1 010.2 010.3 010.4 010.5 010.6 010.7 010.8 010.9 011.a 011.b 011.c 011.d 011.e 011.f 011.g 011.h 011.i 011.j 011.k 011.l 011.m 011.n 011.o 011.p 011.q 011.r 011.s 011.t 011.u 011.v 011.w 011.x 011.y 011.z 011.0 011.1 011.2 011.3 011.4 011.5 011.6 011.7 011.8 011.9 012.a 012.b 012.c 012.d 012.e 012.f 012.g 012.h 012.i 012.j 012.k 012.l 012.m 012.n 012.o 012.p 012.q 012.r 012.s 012.t 012.u 012.v 012.w 012.x 012.y 012.z 012.0 012.1 012.2 012.3 012.4 012.5 012.6 012.7 012.8 012.9 013.a 013.b 013.c 013.d 013.e 013.f 013.g 013.h 013.i 013.j 013.k 013.l 013.m 013.n 013.o 013.p 013.q 013.r 013.s 013.t 013.u 013.v 013.w 013.x 013.y 013.z 013.0 013.1 013.2 013.3 013.4 013.5 013.6 013.7 013.8 013.9 014.a 014.b 014.c 014.d 014.e 014.f 014.g 014.h 014.i 014.j 014.k 014.l 014.m 014.n 014.o 014.p 014.q 014.r 014.s 014.t
# coding: utf-8
from __future__ import print_function
import sys
def filled(seq):
Given a sequence of non-negative numbers, determine the units of "water",
View main.go
package main
import (
selfdiagnose ""
View latency.txt
Latency Comparison Numbers
L1 cache reference 0.5 ns
Branch mispredict 5 ns
L2 cache reference 7 ns 14x L1 cache
Mutex lock/unlock 25 ns
Main memory reference 100 ns 20x L2 cache, 200x L1 cache
Compress 1K bytes with Zippy 3,000 ns 3 us
Send 1K bytes over 1 Gbps network 10,000 ns 10 us
Read 4K randomly from SSD* 150,000 ns 150 us ~1GB/sec SSD
View popcount.go
package main
import (
const N = 8
  • Solve the easiest possible problem in the dumbest possible way.
  • Write a test for it.
  • Is there a better name for this thing?
  • Can we move work between query time (when we need the answer) and ingest time (when we see the data that eventually informs the answer)?
  • Is it easier in a relational data store? A KV Store? A column store? A document store? A graph store?
  • Can performance be improved by batching many small updates?
  • Can clarity be improved by transforming a single update to more smaller updates?
  • Can we more profitably apply a functional or declarative or imperative paradigm to the existing design?
  • Can we profitably apply a change from synchronous to asynchronous, or vice versa?
  • Can we profitably apply an inversion of control, moving logic between many individual call sites, a static central definition, and a reflectively defined description of the work to be done?