Skip to content

Instantly share code, notes, and snippets.

import glob
import os
from argparse import ArgumentParser
import matplotlib.pyplot as plt
if __name__ == '__main__':
arg_parser = ArgumentParser(description='produce a line length histogram for a source folder')
arg_parser.add_argument('source')
from cartopy.crs import PlateCarree, TransverseMercator
plate_carree = PlateCarree()
trans_merc = TransverseMercator()
print trans_merc.transform_point(1, 55, src_crs=plate_carree)
@bblay
bblay / overtakes.py
Last active September 3, 2016 00:11
mins_per_day = 24 * 60
def identify_overtakes(num_hours):
num_mins = num_hours * 60
overtakes = []
last_diffs = [0.0, 0.0]
for i in xrange(num_mins):