Skip to content

Instantly share code, notes, and snippets.

View jlouis's full-sized avatar

Jesper Louis Andersen jlouis

View GitHub Profile
## 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 / 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
@jlouis
jlouis / main.idr
Created July 20, 2017 16:00
Code to explain when to have dessert in minutes
module Main
data MaybeINTHEBLACKHOLE : Type where
YEAH : Nat -> MaybeVOID
NOPE : Void -> MaybeVOID
data Dessert : MaybeINTHEBLACKHOLE -> Type where
Now : Dessert (YEAH 0)
Never : Dessert (NOPE _)
HalfwayBetween : Dessert (YEAH 15)
@jlouis
jlouis / sleepsort.bash
Created May 23, 2017 22:19 — forked from timendum/sleepsort.bash
Sleep sort!
#!/bin/bash
# Sleep sort
# http://dis.4chan.org/read/prog/1295544154
function f() {
sleep "$1"
echo "$1"
}
4> eqc:module({testing_budget, 300}, enacl_eqc).
prop_box_keypair: ....................................................................................................(x10)....................................................................................................(x100)....................................................................................................(x1000)....................................................................................................(x10000).......................................(x1000).......(x100).(x10)....(x1).......
Time limit reached: 10.714 seconds.
OK, passed 508247 tests
prop_box_correct: ....................................................................................................(x10)....................................................................................................(x100)....................................................................................................(x1000)....(x100).....(x10)......(x1)......
Time limit reach
@jlouis
jlouis / gist:19a58f8666d37bc397df4a73e2fdf7d8
Created March 25, 2017 22:22
Running some enacl tests
2> eqc:module({testing_budget, 600}, enacl_eqc).
prop_box_keypair: ....................................................................................................(x10)....................................................................................................(x100)....................................................................................................(x1000)....................................................................................................(x10000)..........................................................................................................(x100).........(x10).(x1)....
Time limit reached: 21.428 seconds.
OK, passed 1172014 tests
prop_box_correct: ....................................................................................................(x10)....................................................................................................(x100)....................................................................................................(x10
@jlouis
jlouis / gist:b805f93c216b67b4bdc05086c04ee354
Created January 21, 2017 15:43
Maps R19 pecularity :)
Shrinking x..xxxxxxx.x..xx.x...x...x...xxxxxxxxxx.xxxxxxxxxxxx(16 times)
{state,[[114329998292617,169767086124435,150891843982850,4522814646874,
146342573201743,66545743623497]],
[],[],"19"}
[{model,maps_eqc},
{init,{state,[[114329998292617,169767086124435,150891843982850,4522814646874,
146342573201743,66545743623497]],
[],[],"19"}},
{set,{var,1},{call,maps_eqc,put,[4.0,0]}},
{set,{var,2},{call,maps_eqc,take,[4]}},