Skip to content

Instantly share code, notes, and snippets.


Jesse Heitler jesseh

  • London, UK
View GitHub Profile
jesseh / Gmail_to_RTM.js
Last active Jun 16, 2017
Create Remember The Milk tasks from Gmail threads by simply adding a label. A Google App Script
View Gmail_to_RTM.js
This script watches a gmail account for any thread labeled with 'rtm'. When such a thread is found it
sends a task-creation email to Remember the Milk that includes a link back to the original thread.
To follow the link back to the email you have to be logged in to the originating Gmail account (which
is only an issue if you have multiple gmail accounts). Otherwise Google claims the email cannot be
To install it go into Google Drive and create a new "Script" (the link is a bit hidden in the create submenu).
Copy this code into the new project and set a time-based trigger.
jesseh /
Created Nov 29, 2012
Pareto Chart with Matplotlib
import pandas as pd
import matplotlib.pyplot as plt
def combined_label(perc, tot):
Format a label to include by Euros and %.
return "{0:,.0f}k EUR, {1:.0f}%".format(perc * tot / 1000, perc * 100)
def cost_cum(data, focus, subject):
jesseh /
Created Nov 29, 2012
Pair Contribution and Selection

This is a data set of the cost of repairing damage done to shipping containers. Each repair involves a type of damage done to a part of a container. And each repair has an associated cost.

The question is how much does a set of damage-part pairs contribute to the total cost of repairs? And, if an intervention were made to address some types of damage and/or some part how much savings would result?

This chart shows the damage types (left side) and the part types (right side). The height of each block indicates the blocks contribution to the total repair costs.

The bands between the two sides show the cost contribution of each damage/part pair. Dark gray bands are selected for the total percentage number, while light gray bands are not.

Putting your mouse over a block label will show what contributes to the repair costs associated with that block.

You can change which damage/part pairs are selected by clicking on the blocks. Within each block. Only damage/part pairs where both the damage and part a

jesseh /
Created Nov 22, 2012 — forked from mbostock/.block

For continuous data such as time series, a streamgraph can be used in place of stacked bars. This example also demonstrates path transitions to interpolate between different layouts. Streamgraph algorithm, colors, and data generation inspired by Byron and Wattenberg.

jesseh / gist:970832
Created May 13, 2011
Generate release notes from Git with test expectations using fabric - see
View gist:970832
def _get_notes(prev_tag, next_tag):
with hide('stdout'):
commits = run("git log --graph --pretty=format:'%h - %s (%cr by %an)%d' "
+ "--abbrev-commit --date=relative"+ " %s..%s"
% (prev_tag, next_tag)).splitlines()
commits.pop() # prev_tag went out with the previous release notes.
commits.reverse() # order going down with time
commits = "\n".join(commits)
commits = re.sub(r"\\",r"__SUB__", commits)
commits = re.sub(r"/",r"\\", commits)
You can’t perform that action at this time.