Skip to content

Instantly share code, notes, and snippets.

View foliea's full-sized avatar

Adrien Folie foliea

  • Paris, France
View GitHub Profile
@foliea
foliea / keybase.md
Created October 6, 2017 06:16
Keybase proof

Keybase proof

I hereby claim:

  • I am foliea on github.
  • I am foliea (https://keybase.io/foliea) on keybase.
  • I have a public key ASB1vTkkkGbHy_0HV1UgdHXvBAKkWzQA-ElWd1WlybpgJAo

To claim this, I am signing this object:

def euclidean_distance(flat, target, criteria)
sum_of_squares = criteria.sum do |criterion|
(flat[criterion] - target[criterion]) ** 2
end
Math.sqrt(sum_of_squares)
end
def rank_flats(flats, target)
criteria = target.keys