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
#!/bin/sh | |
while [ 1 ] | |
do | |
./refresh_bigquery_token.sh | |
sleep 10 | |
done |
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
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 |
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
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; |
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 python | |
import argparse | |
from collections import Counter, namedtuple | |
import json | |
import os | |
import subprocess | |
import sys | |
import textwrap | |
import urllib | |
import webbrowser |
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
/** | |
* jscodeshift script to convert our way of creating React elements in CoffeeScript to | |
* React.createElement. The create-element-to-jsx script then converts the result to JSX. | |
* | |
* For example, this code: | |
* rd.div(myProps, child1, child2) | |
* | |
* becomes: | |
* React.createElement('div', myProps, child1, child2) | |
* |
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
Example from repos/atom/atom/spec/atom-environment-spec.coffee: | |
637 | | |
638 | afterEach -> | |
> 639 | subscription?.dispose() | |
| ^^^^^^^^^^^^^^^^^^^^^ | |
640 | | |
641 | it "invokes onUpdateAvailable listeners", -> | |
Example from repos/atom/atom/spec/atom-reporter.coffee: |
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
Example from repos/atom/atom/src/main-process/spawner.coffee: | |
29 | spawnedProcess.on 'close', (code, signal) -> | |
30 | error ?= new Error("Command failed: #{signal ? code}") if code isnt 0 | |
> 31 | error?.code ?= code | |
| ^^^^^^^^^^^ | |
32 | error?.stdout ?= stdout | |
33 | callback?(error, stdout) | |
Example from repos/atom/atom/src/main-process/spawner.coffee: |
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
class Giraffe | |
if ENABLE_LOUD_GIRAFFES | |
roar: -> | |
return 'ROAR!!!' | |
else | |
roar: -> | |
return 'roar...' |
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
class Giraffe { | |
if (ENABLE_LOUD_GIRAFFES) { | |
roar() { // <- Unexpected token, expected ; (3:11) | |
return 'ROAR!!!'; | |
} | |
} else { | |
roar() { | |
return 'roar...'; | |
} | |
} |
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
colors = (marker.color for marker in getMarkers()) |
OlderNewer