@@ -0,0 +1,611 @@
+#!/usr/bin/env python%0A# Haversine formula%0A%0Afrom math import radians, cos, sin, asin, sqrt%0A%0Adef haversine(lon1, lat1, lon2, lat2):%0A    %22%22%22%0A    Calculate the great circle distance between two points %0A    on the earth (specified in decimal degrees)%0A    %22%22%22%0A    # convert decimal degrees to radians %0A    lon1, lat1, lon2, lat2 = map(radians, %5Blon1, lat1, lon2, lat2%5D)%0A%0A    # haversine formula %0A    dlon = lon2 - lon1 %0A    dlat = lat2 - lat1 %0A    a = sin(dlat/2)**2 + cos(lat1) * cos(lat2) * sin(dlon/2)**2%0A    c = 2 * asin(sqrt(a)) %0A    r = 6371 # Radius of earth in kilometers. Use 3956 for miles%0A    return c * r%0A

Create haversine.py