Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View trainorpj's full-sized avatar

PJ Trainor trainorpj

  • Boston
View GitHub Profile
@trainorpj
trainorpj / better_matplotlib.py
Created August 9, 2019 13:20
matplotlib utilities for better plotting
# copy/paste everything below here
# --------------------------------
import matplotlib.pyplot as plt
# ggplot styles
plt.style.use('ggplot')
# ggplot first six default colors
_gg_colors = ["#F8766D", "#B79F00", "#00BA38", "#00BFC4", "#619CFF", "#F564E3"]
@trainorpj
trainorpj / PJDF.py
Created March 3, 2019 22:07
extending pandas dataframes
import pandas as pd
class PJDF(pd.DataFrame):
def __init__(self, *args, **kwargs):
super(PJDF, self).__init__(*args, **kwargs)
@property
def _constructor(self):
return PJDF
@trainorpj
trainorpj / d3-table-ibm-carbon.markdown
Last active November 27, 2017 16:30
D3 Table (IBM Carbon)
@trainorpj
trainorpj / README.md
Last active January 14, 2016 16:49
Careers of Directors

Note this is a work in progress. The most updated version is on my github.

Directors wear many hats when making a film. They work with the actors, the producers, the cinematographers, the editors, and pretty much anyone else on the set.

As one might guess, directors are not all the same. They have varied careers and styles that show in the credits. My goal was to make a snapshot of several directors, to give an impression as to what they did in the film. Each dot represents the role a director played in a film, going from top to bottom it's director, writer, editor, producer, actor.

Hover over a dot to get more info about that film.