Skip to content

Instantly share code, notes, and snippets.

View lisabang's full-sized avatar
🏠
Working from home

Lisa Bang lisabang

🏠
Working from home
View GitHub Profile
import math
import datetime
#from here: https://stackoverflow.com/questions/19615350/calculate-sunrise-and-sunset-times-for-a-given-gps-coordinate-within-postgresql
class Sun:
def getSunriseTime( self, coords , **kwargs):
return self.calcSunTime( coords, True, **kwargs)
def getSunsetTime( self, coords , **kwargs):
return self.calcSunTime( coords, False, **kwargs)
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Hierarchical clustering with SciPy"
]
},
{
import requests
def getsol(link):
#print requests.get(EXAMLINK).url
examrequest=requests.get(link)
jsonf=examrequest.json()
if 'follow' in jsonf:
#print jsonf.get('follow')
baselink=jsonf.get('follow').split("?")[0]
numbertofollow=jsonf.get('follow').split("=")[1]