Skip to content

Instantly share code, notes, and snippets.

View StuartFarmer's full-sized avatar
🏹
take the shot

Stuart Farmer StuartFarmer

🏹
take the shot
  • Lisbon, Portugal
View GitHub Profile
import urllib2
"""
#Usage:
in a python shell
>> import get_pepperstone_data
>> get_pepperstone_data.run()
# Notes:
1: Selection of pairs is highly opinionated
@StuartFarmer
StuartFarmer / getdocstrings.py
Created May 10, 2018 19:25 — forked from SpotlightKid/getdocstrings.py
Parse Python source code and get or print docstrings.
# -*- coding: utf-8 -*-
"""Parse Python source code and get or print docstrings."""
__all__ = ('get_docstrings', 'print_docstrings')
import ast
from itertools import groupby
from os.path import basename, splitext
MKMapRect zoomRect = MKMapRectNull;
for (id <MKAnnotation> annotation in mapView.annotations) {
MKMapPoint annotationPoint = MKMapPointForCoordinate(annotation.coordinate);
MKMapRect pointRect = MKMapRectMake(annotationPoint.x, annotationPoint.y, 0, 0);
if (MKMapRectIsNull(zoomRect)) {
zoomRect = pointRect;
} else {
zoomRect = MKMapRectUnion(zoomRect, pointRect);
}
}