Skip to content

Instantly share code, notes, and snippets.

Avatar
💭
/o\

Nikolaus Piccolotto prayerslayer

💭
/o\
View GitHub Profile
View data.csv
Series 1
1 4.15958780843744
2 1.63873028828538
3 0.808056534758816
4 -3.57917802735856
5 -2.28096957572749
6 -0.239099580918422
7 3.95655522885885
8 3.01897073368165
9 0.915924677901633
@prayerslayer
prayerslayer / all.csv
Last active Nov 12, 2019
Time series with stochastic volatility
View all.csv
We can't make this file beautiful and searchable because it's too large.
"","Series 1","Series 2","Series 3","Series 4","Series 5","Series 6","Series 7","Series 8","Series 9","Series 10","Series 11","Series 12","Series 13","Series 14","Series 15","Series 16","Series 17","Series 18","Series 19","Series 20","Series 21","Series 22","Series 23"
"1",-1.52638379307633,-1.83878434075978,-0.906173265867607,2.89620549217749,-0.697546956947543,-0.295814983336317,-0.815041680432233,1.70581589765478,1.23810398810873,0.101148935398539,4.17729001128286,0.160389526509387,0.195972137512933,1.65265219728888,1.62410405026759,-0.49267407814887,-0.455887270569605,3.7446321600723,0.583349853741263,-1.61125561789179,1.8916310785271,2.14386094737502,-1.4686715046996
@prayerslayer
prayerslayer / temp.csv
Created Oct 15, 2019
Daily max temperature (degree Celsius) in Landeck, Austria (1948–2009)
View temp.csv
y m d degree
1948 9 3 19.1
1948 9 4 21.1
1948 9 5 20.1
1948 9 6 19.1
1948 9 7 15.2
1948 9 8 18.1
1948 9 9 22.1
1948 9 10 25.2
1948 9 11 26.3
@prayerslayer
prayerslayer / elapsed_by_keyword.py
Created Jan 28, 2019
Find slow Robot Framework keywords
View elapsed_by_keyword.py
#!/usr/bin/env python
"""Usage: elapsed_by_keyword path/to/output.xml
Reads result of a test run from Robot output file
and outputs "keyword elapsed_time"
sorted by the elapsed time in each keyword.
"""
import sys
@prayerslayer
prayerslayer / find_color.js
Created May 7, 2018
Find used colors on page
View find_color.js
function colorCount() {
function trim(str) {
return str.replace(/^\s+|\s+$/gm, '');
}
function toComponents(str) {
return str.match(/rgba?\((.+)\)/)[1].split(',').map(s => s.trim()).map(s => parseInt(s, 10))
}
function componentToHex(c) {
@prayerslayer
prayerslayer / gist.js
Last active Sep 29, 2017
8x8 Matrix with 10 1s on random positions
View gist.js
function shuffle(a) {
for (let i = a.length; i; i--) {
let j = Math.floor(Math.random() * i);
[a[i - 1], a[j]] = [a[j], a[i - 1]];
}
return a;
}
function range(n) {
return new Array(n).fill(0).map((_, i) => i);
@prayerslayer
prayerslayer / output.txt
Last active Sep 28, 2015
Tests JSON encoding performance of different clojure libs
View output.txt
content length
5073891
cheshire
"Elapsed time: 103.332902 msecs"
clj-json
"Elapsed time: 79.033905 msecs"
core.json
"Elapsed time: 638.59961 msecs"
View index.html
<!DOCTYPE html>
<meta charset="utf-8">
<style>
.node {
stroke-width: 1.5px;
}
</style>
<body>
View README.md
You can’t perform that action at this time.