Skip to content

Instantly share code, notes, and snippets.

Travis Kaufman traviskaufman

Block or report user

Report or block traviskaufman

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
# ipython-utils/researchenv/
# imports...
from researchenv.magics import ResearchEnvMagics
from import bigquery
def load_ipython_extension(ipython: InteractiveShell):
# previous logic...
bq = bigquery.Client(project='example-project-id')
ipython.register_magics(ResearchEnvMagics(shell=ipython, bq=bq))
# ipython-utils/researchenv/
from IPython.core.magic import Magics, magics_class, cell_magic, needs_local_scope
from IPython.core.magic_arguments import magic_arguments, argument, parse_argstring
from IPython.core.interactiveshell import InteractiveShell
from IPython.core.display import display
from import bigquery
class ResearchEnvMagics(Magics):
View fc7627756370-4.sql
%%bq --name hn_daily_comment_counts
TIMESTAMP_TRUNC(time_ts, DAY) as day,
COUNT(0) as comment_count
day ASC;
# ipython-utils/
'ipython >= 4',
'notebook >= 4.3.1',
# ipython-utils/researchenv/
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
import seaborn as sns
from IPython.core.interactiveshell import InteractiveShell
def load_ipython_extension(ipython: InteractiveShell):
print('%matplotlib inline')
%matplotlib inline
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
import seaborn as sns

Closure Compiler Support

Google Closure Compiler support is required in order to support the Google projects and properties which are built around this toolchain. Concretely, MDC-Web must be able to compile with ADVANCED_OPTIMIZATIONS enabled, and produce no errors or warnings. There are implications for internal support as well, but that is outside the scope of this issue.


  • Full compilation of MDC-Web using ADVANCED_OPTIMIZATIONS
  • Test infrastructure to verify both compilation, as well as runtime correctness, e.g. our closurized code behaves correctly
View mdc-web-tape2mocha.js
* @fileoverview one-off script to transform MDC-Web's tests from tape to mocha.
* See
const fs = require('fs');
const path = require('path');
const babylon = require('babylon');
const glob = require('glob');
traviskaufman / MLPMnistSingleLayerExample.scala
Created Oct 25, 2016
dl4j's MLPMnistSingleLayerExample in Scala
View MLPMnistSingleLayerExample.scala
* @see
import scala.collection.JavaConversions._
import org.deeplearning4j.datasets.iterator.impl.MnistDataSetIterator
import org.deeplearning4j.eval.Evaluation
import org.deeplearning4j.nn.api.OptimizationAlgorithm
import org.deeplearning4j.nn.conf.NeuralNetConfiguration
traviskaufman /
Last active Sep 12, 2016
Tips for Coming to Rust from Javascript (WIP)

The following are tips I put together which I would have found helpful after coming to rust from Javascript.

NOTE: If you've never used a statically-typed programming language before, I highly recommend checking out Liz Baille's illustrated survival guide presentation from RustConf 2016.

I've been using Javascript both personally and professionally as my primary language. In many cases, even exclusively. However, I actually got my start in systems programming, writing really bad C code for MaxMSP, and it therefore has a special place in my heart.

Rust is like C, but way better. The rust team has essentially taken the complexity of designing a high-level language runtime and pushed it down the compiler. This is insanely impressive, and produces ridiculously incredible results. This is systems programming language with things like traits, generics, very intelligent type inference,

You can’t perform that action at this time.