I hereby claim:
- I am danielsanchezq on github.
- I am netwave (https://keybase.io/netwave) on keybase.
- I have a public key ASBVfZvvkvmyQlUIyK7jDaQsE8e9lIqAhHqjASkaZoIF2Qo
To claim this, I am signing this object:
from typing import List, Set, TypeAlias, Sequence | |
from itertools import cycle | |
NodeId: TypeAlias = bytes | |
def calculate_subnets(nodes_list: Sequence[NodeId], num_subnets: int, replication_factor: int) -> List[Set[NodeId]]: | |
""" | |
Calculate in which subnet(s) to place each node. |
verifier fastest │ slowest │ median │ mean │ samples │ iters | |
╰─ verify │ │ │ │ │ | |
├─ 32 │ │ │ │ │ | |
│ ├─ 128 36.91 ms │ 36.91 ms │ 36.91 ms │ 36.91 ms │ 1 │ 30 | |
│ │ 866.8 B/s │ 866.8 B/s │ 866.8 B/s │ 866.8 B/s │ │ | |
│ ├─ 256 20.77 ms │ 20.77 ms │ 20.77 ms │ 20.77 ms │ 1 │ 30 | |
│ │ 1.54 KB/s │ 1.54 KB/s │ 1.54 KB/s │ 1.54 KB/s │ │ | |
│ ├─ 512 12.56 ms │ 12.56 ms │ 12.56 ms │ 12.56 ms │ 1 │ 30 | |
│ │ 2.546 KB/s │ 2.546 KB/s │ 2.546 KB/s │ 2.546 KB/s │ │ | |
│ ├─ 1024 8.469 ms │ 8.469 ms │ 8.469 ms │ 8.469 ms │ 1 │ 30 |
encoder fastest │ slowest │ median │ mean │ samples │ iters | |
╰─ encode │ │ │ │ │ | |
├─ 32 │ │ │ │ │ | |
│ ├─ 128 436.8 ms │ 436.8 ms │ 436.8 ms │ 436.8 ms │ 1 │ 1 | |
│ │ 75.01 KB/s │ 75.01 KB/s │ 75.01 KB/s │ 75.01 KB/s │ │ | |
│ ├─ 256 615 ms │ 615 ms │ 615 ms │ 615 ms │ 1 │ 1 | |
│ │ 53.27 KB/s │ 53.27 KB/s │ 53.27 KB/s │ 53.27 KB/s │ │ | |
│ ├─ 512 1.112 s │ 1.112 s │ 1.112 s │ 1.112 s │ 1 │ 1 | |
│ │ 29.46 KB/s │ 29.46 KB/s │ 29.46 KB/s │ 29.46 KB/s │ │ | |
│ ├─ 1024 1.853 s │ 1.853 s │ 1.853 s │ 1.853 s │ 1 │ 1 |
from collections import defaultdict | |
from math import ceil | |
benches_results = { | |
"proofs": { | |
128: 0.28, | |
256: 0.47, | |
512: 0.82, | |
1024: 1.39 | |
}, |
use const_str; | |
pub trait Foo { | |
const ID: &'static str; | |
} | |
struct A; | |
struct B; | |
impl Foo for A { |
use std::fs; | |
use std::io; | |
use std::io::BufReader; | |
use std::path::{Path, PathBuf}; | |
use bincode::Options; | |
type PersistentFragmentLog = String; | |
struct FileFragments { |
#ifndef _MEM_LICKER_ | |
#define _MEM_LICKER_ | |
#include <unordered_map> | |
#include <iostream> | |
#include <string> | |
using namespace std; | |
using ptr = void*; | |
struct PtrData |
I hereby claim:
To claim this, I am signing this object:
#ifndef _MEM_LICKER_ | |
#define _MEM_LICKER_ | |
#include <unordered_map> | |
#include <iostream> | |
#include <string> | |
using namespace std; | |
using ptr = void*; | |
struct PtrData |
trait Functor <A, B, C, F> where F : Fn(&A) -> B { | |
fn fmap(&self, f: F) -> C; | |
} | |
enum List<T> { | |
Nil, | |
List(T, Box<List<T>>) | |
} | |
impl<A, B, F> Functor<A, B, List<B>, F> for List<A> |