Skip to content

Instantly share code, notes, and snippets.

View jlouis's full-sized avatar

Jesper Louis Andersen jlouis

View GitHub Profile
@jlouis
jlouis / erl_map.c.gcov
Created April 5, 2015 20:23
Coverage of erl_map.c with 1000 tests run.
-: 0:Source:beam/erl_map.c
-: 0:Graph:obj/x86_64-unknown-linux-gnu/gcov/smp/erl_map.gcno
-: 0:Data:obj/x86_64-unknown-linux-gnu/gcov/smp/erl_map.gcda
-: 0:Runs:4
-: 0:Programs:1
-: 1:/*
-: 2: * %CopyrightBegin%
-: 3: *
-: 4: * Copyright Ericsson AB 2014. All Rights Reserved.
-: 5: *
@jlouis
jlouis / map_count
Created January 11, 2015 12:13
Most played Quake Live maps
jlouis@lady-of-pain:~$ curl http://192.168.1.201:8080/stats/global/map_count
Map Count
bloodrun 1344726
aerowalk 640641
campgrounds 291561
furiousheights 259708
lostworld 244620
toxicity 235243
cure 114111
hektik 94246
86> eqc:quickcheck(transit_eqc:prop_iso_json_verbose()).
..............................................................................................Failed! After 95 tests.
#{4436653002 => ferb,
5011044860 => {tagged_value,<<"u">>,<<"a324f310-c501-70cd-fc42-9fa0d338a2be">>},
7244902917 => phineas,
9902687802 => <<243,130,156,156,242,175,144,182,243,138,135,130,241,179,179,172,240,148,
189,144,242,135,131,184,242,166,183,178,240,183,172,145,243,162,163,151,
242,142,161,191,241,129,145,131>>,
'Z' => <<>>,
undefined => ab,
## Enable kernel poll and a few async threads
+K true
+A 5
+Q 64000
+P 128000
+sbt db
+sbwt very_long
+swt very_low
+sub true
+Mulmbcs 32767
## Libraries we are going to need
library(tidyverse)
library(lubridate)
## Load in the data set
vdecls <- readxl::read_xlsx("stramkurs.xlsx", col_types=c("date"))
## Fixup the data set, since Excel is utter crap. There are some NA values, get
## rid of those
vdecls <- filter(vdecls, !is.na(vdecls))
## The name of the column is rather irritating, fixup
@jlouis
jlouis / client_eqc.erl
Created June 15, 2015 15:56
EQC Cluster example
-module(client_eqc).
-compile(export_all).
-include_lib("eqc/include/eqc.hrl").
-include_lib("eqc/include/eqc_component.hrl").
api_spec() ->
#api_spec {
language = erlang,
modules = [
@jlouis
jlouis / Oddity
Created May 15, 2018 19:22
Oddity, continued
Eshell V9.3 (abort with ^G)
(eqc@127.0.0.1)1> <<F:64/float>> = <<128,0,0,0,0,0,0,0>>.
<<128,0,0,0,0,0,0,0>>
(eqc@127.0.0.1)2> G = 0.0.
0.0
(eqc@127.0.0.1)3> F.
0.0
(eqc@127.0.0.1)4> G.
0.0
(eqc@127.0.0.1)5> F == G.
@jlouis
jlouis / oddity
Created May 15, 2018 18:45
Release 20.0
Shrinking x..xxxxxxxxxx.x..x.x...x..xxxxxxxxx.x..x..xx.xxxxxxxxxxxxx(17 times)
{state,[[114329998292617,169767086124435,150891843982850,4522814646874,
146342573201743,66545743623497]],
[],[]}
[{model,maps_eqc},
{init,{state,[[114329998292617,169767086124435,150891843982850,4522814646874,
146342573201743,66545743623497]],
[],[]}},
{set,{var,1},{call,maps_eqc,populate,[puts,[{0.0,true}]]}},
{set,{var,2},{call,maps_eqc,put,[0.0,[]]}},
{state,[[114329998292617,169767086124435,150891843982850,4522814646874,
146342573201743,66545743623497]],
[],[]}
[{model,maps_eqc},
{init,{state,[[114329998292617,169767086124435,150891843982850,4522814646874,
146342573201743,66545743623497]],
[],[]}},
{set,{var,1},
{call,maps_eqc,populate,
[puts,
@jlouis
jlouis / 1
Created April 18, 2018 22:28
Toying
[jlouis@lady-of-pain tmp]$ cat foo.csv
BenchmarkBlake2B/1-8 5000000 303 ns/op 3.29 MB/s 0 B/op 0 allocs/op
BenchmarkBlake2B/2-8 5000000 317 ns/op 6.30 MB/s 0 B/op 0 allocs/op
BenchmarkBlake2B/4-8 5000000 304 ns/op 13.14 MB/s 0 B/op 0 allocs/op
BenchmarkBlake2B/8-8 5000000 301 ns/op 26.51 MB/s 0 B/op 0 allocs/op
BenchmarkBlake2B/32-8 5000000 312 ns/op 102.44 MB/s 0 B/op 0 allocs/op
BenchmarkBlake2B/64-8 5000000 282 ns/op 226.20 MB/s 0 B/op 0 allocs/op
BenchmarkBlake2B/128-8 5000000 251 ns/op 509.27 MB/s 0 B/op 0 allocs/op
BenchmarkBlake2B/256-8 3000000 439 ns/op 582.19 MB/s 0 B/op 0 allocs/op
BenchmarkBlake2B/512-8 2000000 770 ns/op 664.14 MB/s 0 B/op 0 allocs/op