Skip to content

Instantly share code, notes, and snippets.

View techedlaksh's full-sized avatar
🏠
Finding the right opportunities

Laksh Arora techedlaksh

🏠
Finding the right opportunities
View GitHub Profile
@techedlaksh
techedlaksh / hellinger.py
Created December 10, 2016 12:04 — forked from larsmans/hellinger.py
Hellinger distance for discrete probability distributions in Python
"""
Three ways of computing the Hellinger distance between two discrete
probability distributions using NumPy and SciPy.
"""
import numpy as np
from scipy.linalg import norm
from scipy.spatial.distance import euclidean
{"Result":1,"Items":[{"TemplateId":"\"BADGE_BATTLE_ATTACK_WON\"","Badge":{"BadgeType":"BADGE_BATTLE_ATTACK_WON","BadgeRanks":4,"Targets":"\"\\nd\\350\\007\""}},{"TemplateId":"\"BADGE_BATTLE_TRAINING_WON\"","Badge":{"BadgeType":"BADGE_BATTLE_TRAINING_WON","BadgeRanks":4,"Targets":"\"\\nd\\350\\007\""}},{"TemplateId":"\"BADGE_BIG_MAGIKARP\"","Badge":{"BadgeType":"BADGE_BIG_MAGIKARP","BadgeRanks":4,"Targets":"\"\\0032\\254\\002\""}},{"TemplateId":"\"BADGE_CAPTURE_TOTAL\"","Badge":{"BadgeType":"BADGE_CAPTURE_TOTAL","BadgeRanks":4,"Targets":"\"\\036\\364\\003\\320\\017\""}},{"TemplateId":"\"BADGE_EVOLVED_TOTAL\"","Badge":{"BadgeType":"BADGE_EVOLVED_TOTAL","BadgeRanks":4,"Targets":"\"\\003\\024\\310\\001\""}},{"TemplateId":"\"BADGE_HATCHED_TOTAL\"","Badge":{"BadgeType":"BADGE_HATCHED_TOTAL","BadgeRanks":4,"Targets":"\"\\nd\\364\\003\""}},{"TemplateId":"\"BADGE_PIKACHU\"","Badge":{"BadgeType":"BADGE_PIKACHU","BadgeRanks":4,"Targets":"\"\\0032\\254\\002\""}},{"TemplateId":"\"BADGE_POKEDEX_ENTRIES\"","Badge":{"BadgeTy