I hereby claim:
- I am ewjoachim on github.
- I am ewjoachim (https://keybase.io/ewjoachim) on keybase.
- I have a public key whose fingerprint is 9018 4FBE 55F2 A1F7 EBC9 A49E 4E90 5C37 D2C6 5627
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
from math import cos, sin, radians, atan2, sqrt | |
radius = 6371 # km | |
def distance(origin, destination): | |
""" | |
Determine distance between 2 sets of [lat,lon] in km | |
""" |
#!/usr/bin/env python3 | |
# coding=utf-8 | |
""" | |
Borrowed and updated from | |
https://adamj.eu/tech/2014/09/21/using-ipython-notebook-to-write-jekyll-blog-posts/ | |
""" | |
from __future__ import print_function |
import inspect | |
def debug(): | |
""" | |
Anywhere in the code: | |
debug() # opens ipython shell | |
""" | |
from IPython.terminal.embed import InteractiveShellEmbed | |
ipshell = InteractiveShellEmbed() |
def get_linked_objects(obj): | |
""" | |
Returns all the objects that would be deleted if a cascade deletion were to be done. | |
""" | |
links = [rel.get_accessor_name() for rel in obj._meta.get_all_related_objects()] | |
return [liked_obj for link in links for liked_obj in getattr(obj, link).all()] |
define(["jq"], function($){ | |
"use strict"; | |
var Class = function(){}; | |
var minimal_class_definition = | |
{ | |
init: function() | |
{ | |
} | |
}; | |
var extend = function (base_class, additionnal_definition) |