I hereby claim:
- I am mmmries on github.
- I am mmmries (https://keybase.io/mmmries) on keybase.
- I have a public key whose fingerprint is 99B1 CC8A FE86 779F 3F7C 3D80 DA6C FBE7 2629 D9CF
To claim this, I am signing this object:
quick_benchmark = fn(tcfn, tcn) -> | |
tc_l = :lists.seq(1,tcn) |> Enum.map(fn(_)-> tcfn |> :timer.tc |> elem(0) end) | |
tc_min = :lists.min(tc_l) | |
tc_max = :lists.max(tc_l) | |
tc_med = :lists.nth(round((tcn - 1) / 2), :lists.sort(tc_l)) | |
tc_avg = round(Enum.sum(tc_l) / tcn) | |
%{min: tc_min, max: tc_max, median: tc_med, average: tc_avg} | |
end | |
# quick_benchmark.(fn() -> do_some_work() end, 1000) will do 1000 iterations of work and report median, average, min and max back to you in microseconds |
I hereby claim:
To claim this, I am signing this object:
defmodule Benchmarks do | |
def init do | |
:ok = :lbm_kv.create(Web.Job) | |
end | |
def count_entries do | |
IO.puts "Web.Job => #{:lbm_kv.match_key(Web.Job, :_) |> elem(1) |> Enum.count}" | |
end | |
def measure_throughput(fun, num_items) do |
23:45:35.612 [debug] temperature update: {"/sys/bus/w1/devices/28-000007621b25/w1_slave", 21.625} | |
23:45:36.940 [debug] temperature update: {"/sys/bus/w1/devices/28-000007621b25/w1_slave", 21.625} | |
23:45:38.260 [debug] temperature update: {"/sys/bus/w1/devices/28-000007621b25/w1_slave", 21.625} | |
23:45:39.591 [debug] temperature update: {"/sys/bus/w1/devices/28-000007621b25/w1_slave", 21.687} | |
23:45:40.940 [debug] temperature update: {"/sys/bus/w1/devices/28-000007621b25/w1_slave", 21.687} |
var ColorConversion = require('helpers/ColorConversion'); | |
/** | |
Used for parsing all css rules on the document | |
object and replacing any default brand color | |
instances with the client's brand color scheme. | |
@class CssHelper | |
@example | |
```javascript |
First get the rrobots running locally on your machine by following the README on the repo.
Next make your own bot by making a file with the same name as the class that it defines (just like the examples/NervousDuck.rb
defines the NervousDuck
class).
Now put your bot into a gist and send a link to your gist to the person running the tournament.
You have configured application Ultron in your config/config.exs | |
but the application is not available. | |
This usually means one of: | |
1. You have not added the application as a dependency in a mix.exs file. | |
2. You are configuring an application that does not really exist. | |
Please ensure Ultron exists or remove the configuration. |
These are my solutions to the three concurrency exercises from Katrina Owen's Go Post.
I'm posting here with example output in the hopes that someone call tell me how to do it better
class Goal | |
attr_accessor :name, :total_amount, :amount_saved_so_far, :predicted_to_complete_at | |
def initialize(name, total_amount, amount_saved_so_far) | |
self.name = name | |
self.total_amount = total_amount | |
self.amount_saved_so_far = amount_saved_so_far | |
end | |
end |
games.riesd.com hosts online games that have an open API so you can easily write a game client and have it play against an opponent. The the site is written in elixir and uses phoenix and channels.
Opponents can be: