Skip to content

Instantly share code, notes, and snippets.

View mdepolli's full-sized avatar

Marcelo De Polli mdepolli

View GitHub Profile
@mdepolli
mdepolli / beatles.rb
Created November 30, 2017 00:19
Ruby para iniciantes - 29/nov/2017
john = "John Lennon"
ringo = "Ringo Starr"
paul = "Paul McCartney"
george = "George Harrison"
beatles = [john, ringo, paul, george]
sorted_beatles = beatles.sort
puts sorted_beatles
Verifying my Blockstack ID is secured with the address 1FaMJoHHkn1WiHDjdAwf83myWrwHY3661d https://explorer.blockstack.org/address/1FaMJoHHkn1WiHDjdAwf83myWrwHY3661d
Mix.install([:benchee])
defmodule Test do
def benchmark() do
vector1 = Enum.map(1..1536, fn _ -> :rand.uniform() end)
vector2 = Enum.map(1..1536, fn _ -> :rand.uniform() end)
Benchee.run(
%{
"dot_product_enum" => fn -> dot_product_enum(vector1, vector2) end,