Skip to content

Instantly share code, notes, and snippets.

@tonyfast
tonyfast / WQ_Data.ipynb
Last active August 29, 2015 14:25 — forked from phobson/WQ_Data.ipynb
Water quality data and pandas
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
<html>
<body>
<span id="output"></span>
</body>
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script>
<script src="main.js"></script>
</html>
@tonyfast
tonyfast / firstnb.ipynb
Last active August 29, 2015 14:25 — forked from ICBacon/MyFirstNotebook.yml
Programmatically discovering old gists
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
<head>
<script src="http://cdn.pydata.org/bokeh/release/bokeh-0.8.1.min.js"></script>
<link href="http://cdn.pydata.org/bokeh/release/bokeh-0.8.1.min.css" rel="stylesheet">
</head>
<div id=08fd29cc51d3761133a159ca4f697be5 class="plotdiv"></div>
<script type="text/javascript">
Bokeh.$(function() {
var modelid = "a57e43d6b7e067caeaa2a9159e4e5d59";
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@tonyfast
tonyfast / Disqus Magic.ipynb
Last active August 29, 2015 14:22 — forked from anonymous/Disqus Magic.ipynb
Disqus Magic for IPython notebooks
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

For ETS's SKLL project, we found out the hard way that Travis-CI's support for numpy and scipy is pretty abysmal. There are pre-installed versions of numpy for some versions of Python, but those are seriously out of date, and scipy is not there are at all. The two most popular approaches for working around this are to (1) build everything from scratch, or (2) use apt-get to install more recent (but still out of date) versions of numpy and scipy. Both of these approaches lead to longer build times, and with the second approach, you still don't have the most recent versions of anything. To circumvent these issues, we've switched to using Miniconda (Anaconda's lightweight cousin) to install everything.

A template for installing a simple Python package that relies on numpy and scipy using Miniconda is provided below. Since it's a common s

Auto-deploying built products to gh-pages with Travis

This is a set up for projects which want to check in only their source files, but have their gh-pages branch automatically updated with some compiled output every time they push.

Create a compile script

You want a script that does a local compile to e.g. an out/ directory. Let's call this compile.sh for our purposes, but for your project it might be npm build or gulp make-docs or anything similar.

The out/ directory should contain everything you want deployed to gh-pages. That almost always includes an index.html.

Bombardier's Guild is a fun steampunk-like mobile game app that I used to play a lot. Basically, you have to shoot a projectile from one planet to hit another, while navigating a static, 2D n-body problem inbetween. It's a simple setup but a highly nonlinear four-dimensional system with two free parameters. For certain configurations of the n body obstacles, trajectory designs are very hard to intuit and figure out because of chaotic parameter regions (exponentially high sensitivity of final outcome to small changes in parameters). Hence the interest in visual diagnostic tools to assist a player in deconstructing and eventually solving the game.

I was inspired to recreate some of Bombardier's core gameplay as part of a demonstration of innovative new model exploration and algorithm diagnosis tools (see screenshot demo_shot.png below)

Here, you see a trajectory that successfully hits a user-defined target, with heatmap color coding along the line segment traj

@tonyfast
tonyfast / body_config.yml
Last active August 29, 2015 14:18 — forked from robclewley/body_config.yml
Basic Visualization of Bombadier
Domain:
x: [-0.7, 0.7]
y: [0, 1.0]
Full_model:
0:
density: 0.0
radius: 0.08
position: [0.0, 0.0]
1:
density: 0.5