This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
inline int64_t get_monotonous_click() { | |
static std::atomic<int64_t> last_click{0}; | |
int64_t timestamp{ | |
std::chrono::system_clock::now().time_since_epoch() | |
/ std::chrono::microseconds(1)}; | |
int64_t old_click{last_click.load()}; | |
int64_t new_click{0}; | |
do { | |
new_click = std::max(timestamp, old_click + 1); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
template<typename Scalar> | |
struct ImmutableParams { | |
std::vector<Eigen::Map<const DynamicMatrix<Scalar>>> W; | |
std::vector<Eigen::Map<const DynamicVector<Scalar>>> b; | |
}; | |
template<typename Scalar> | |
struct MutableParams { | |
std::vector<Eigen::Map<DynamicMatrix<Scalar>>> W; | |
std::vector<Eigen::Map<DynamicVector<Scalar>>> b; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <chrono> | |
#include <iostream> | |
#include <vector> | |
using namespace std; | |
template<typename T> | |
uint64_t time_it_us(const T& t) { | |
auto begin = std::chrono::high_resolution_clock::now(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Verifying that +anih is my openname (Bitcoin username). https://onename.com/anih |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
struct Entity { | |
type @0 :EntityType; | |
union { | |
id @0 :Text; | |
blob @1 :Text; | |
text @1 :List(Text); | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
emit_left_id(Obj, _, TargetBucket) -> | |
try | |
Key = riak_object:key(Obj), | |
Triple = mochijson2:decode(riak_object:get_value(Obj)), | |
case proplists:get_all_values(<<"left_id_s">>, element(2, Triple)) of | |
[Id] -> [{{{<<"maps">>, TargetBucket}, Id}, | |
{{<<"maps">>, TargetBucket}, Id, Key, Triple}}]; | |
_ -> [] | |
end | |
catch |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCtitJ/uiynqT9VxZZfos7c0INrzJEWq306QRenZ3Za5zZfZs50b1P1qgcvQKrrX/3EP1KZ5b1QXOjoPovaIIYoiNuNaBJYYHRK+EcjxDlFt/EsBgEQHxZyEp8J7ss3pfDuwS0QxUOFA7ABDJieS7O5GXfNfEqwZ6w4Ttpjwpg2fMihN9MZ0/3Rk2PSKNxfH5kYrwKY/rauZIjDmC/vDf0qwjDZy6W6M2HnOy5NlcGduQJv+ixdY4yMlY5XTZg6ymoBCOu4daKxmQb+YRl+wy/0/o/kjhyElF+nJXnwgyUniQUFMpPJeNyI9Xq3w7XDpaiJVL3GwXyP36PTCX3t2TXf marius@reinfer.io |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"metadata": { | |
"name": "Untitled1" | |
}, | |
"nbformat": 3, | |
"nbformat_minor": 0, | |
"worksheets": [ | |
{ | |
"cells": [ | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SCALE = 0.1 | |
XMIN = 820 | |
GAMMA = 3.63719 | |
fb_ccdf = ccdf(degs) | |
xs = array(fb_ccdf[0][500:]) | |
power_law = array(xs / XMIN) ** (-GAMMA + 1) * SCALE |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
➜ riakpp git:(master) build/release/src/riaktool -m 10000 -k 10000 | |
[0] riaktool.cpp:81:main: Creating connection pool... | |
[0] riaktool.cpp:85:main: Buffering messages... | |
[0] riaktool.cpp:109:main: Buffered 0 messages. | |
[0] riaktool.cpp:109:main: Buffered 500 messages. | |
[0] riaktool.cpp:109:main: Buffered 1000 messages. | |
[0] riaktool.cpp:109:main: Buffered 1500 messages. | |
[0] riaktool.cpp:109:main: Buffered 2000 messages. | |
[0] riaktool.cpp:109:main: Buffered 2500 messages. | |
[0] riaktool.cpp:109:main: Buffered 3000 messages. |
OlderNewer