Skip to content

Instantly share code, notes, and snippets.

View kolatat's full-sized avatar

Kolatat Thangkasemvathana kolatat

View GitHub Profile
@kolatat
kolatat / k_clostest.py
Created September 5, 2017 05:57 — forked from natebwangsut/k_clostest.py
Hello
import math
# distance formula
def distance(x, y):
sum = 0
# enumerate over all xs and ys together
for (xs, ys) in zip(x,y):
sum += ((xs-ys) ** 2)
return math.sqrt(sum)