Code used in my optimization talk at PrDC 2014