Skip to content

Instantly share code, notes, and snippets.

View alangpierce's full-sized avatar

Alan Pierce alangpierce

  • Benchling
  • San Francisco, CA
View GitHub Profile
@alangpierce
alangpierce / decaffeinate.py
Last active August 6, 2016 02:46
Benchling decaffeinate wrapper script
#!/usr/bin/env python
import argparse
from collections import Counter, namedtuple
import json
import os
import subprocess
import sys
import textwrap
import urllib
import webbrowser
@alangpierce
alangpierce / GraphGenerator.java
Last active August 29, 2015 14:23
Java class that walks the Dagger dependencies in the KA code and generates a .dot file to use for a visual representation.
package org.khanacademy.android.graphgen;
import org.khanacademy.android.dependencies.components.ApplicationComponent;
import dagger.Component;
import dagger.Provides;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.InputStream;
@alangpierce
alangpierce / BigBingo
Last active May 26, 2022 02:05
BigBingo (as of early July 2014)
Snapshot of Khan Academy's BigBingo A/B testing framework and related code.
Here's a basic overview:
-summarize.py is the most interesting file. It contains all stages of the
summarize task, as well as the publish and archive steps that happen at the
end.
-bq_pipelines.py contains lots of useful pipelines for interacting with
BigQuery. QueryToTableBatchPipeline can run many simultaneous queries, and will
properly handle all batching and retry logic.
-config.py is where all experiment configuraiton lives. For this Gist, I
@alangpierce
alangpierce / keep_refreshing_token.sh
Created May 12, 2014 18:37
BigQuery token refresh scripts for KA dev environment
#!/bin/sh
while [ 1 ]
do
./refresh_bigquery_token.sh
sleep 10
done