Skip to content

Instantly share code, notes, and snippets.

View basaks's full-sized avatar

Sudipta Basak basaks

  • Geoscience Australia
  • Sydney
View GitHub Profile
@basaks
basaks / australian-postcodes.sql
Created July 8, 2019 01:01 — forked from randomecho/australian-postcodes.sql
Australian postcodes (with states and suburb names) geocoded with latitude and longitude.
/*
Taken and cribbed from blog.datalicious.com/free-download-all-australian-postcodes-geocod
May contain errors where latitude and longitude are off. Use at own non-validated risk.
*/
SET NAMES utf8;
SET sql_mode = 'NO_AUTO_VALUE_ON_ZERO';
DROP TABLE IF EXISTS postcodes_geo;
@basaks
basaks / kl.py
Last active May 25, 2022 04:42 — forked from atabakd/kl.py
KL divergence for multivariate samples
# https://mail.python.org/pipermail/scipy-user/2011-May/029521.html
import numpy as np
from scipy.spatial import cKDTree as KDTree
from scipy.special import rel_entr
def KLdivergence(x, y):
"""Compute the Kullback-Leibler divergence between two multivariate samples.
Parameters