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
SELECT | |
overlay( | |
overlay( | |
gen_random_ulid()::STRING | |
PLACING | |
overlay( | |
'0' -- caution: prepending '0' is only appropriate until June of 2527 | |
|| | |
to_hex( | |
( |
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
SELECT | |
'epoch'::TIMESTAMPTZ | |
+ | |
( | |
'x' | |
|| | |
lpad( | |
substr( | |
replace( | |
the_uuid::STRING, |
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
# works on Mac OS X and Linux. haven't tried BSD. obviously windows is out. | |
import os | |
import subprocess | |
import signal | |
def get_tty_fg(): | |
# make a new process group within the same session as the parent. we | |
# do this so that if the user hits ctrl-c, etc in the curses program | |
# that's about to be exec'd, the SIGINT and friends won't be sent to |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
package main | |
import ( | |
"sync" | |
"time" | |
"unsafe" | |
"golang.org/x/text/language" | |
"golang.org/x/text/message" | |
) |
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
#!/usr/bin/env python | |
# | |
# runnable-pyc | |
usage_info = \ | |
"""runnable-pyc - make compiled Python code into an executable file | |
Usage: runnable-pyc <pycfile> [<outputfile>] | |
If no outputfile is specified, and pycfile ends in '.pyc', then the default |
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
data loss | lambda | dq thresh | grace rounds | dq fraction | mean rounds to dq | rounds | |
---|---|---|---|---|---|---|---|
0.01 | 0.950 | 0.90 | 30 | 0.193 | 473.36 | 1000 | |
0.02 | 0.950 | 0.90 | 30 | 0.724 | 399.98 | 1000 | |
0.03 | 0.950 | 0.90 | 30 | 0.975 | 271.07 | 1000 | |
0.04 | 0.950 | 0.90 | 30 | 0.998 | 153.60 | 1000 | |
0.05 | 0.950 | 0.90 | 30 | 1.000 | 99.79 | 1000 | |
0.06 | 0.950 | 0.90 | 30 | 1.000 | 74.29 | 1000 | |
0.01 | 0.980 | 0.90 | 30 | 0.001 | 50.00 | 1000 | |
0.02 | 0.980 | 0.90 | 30 | 0.032 | 145.78 | 1000 | |
0.03 | 0.980 | 0.90 | 30 | 0.202 | 291.65 | 1000 |
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
Data Lost | Nodes | Lambda | Init-alpha | Init-beta | Succ-adj | Fail-adj | DQ thresh | Weight | Audits | % DQ'd | Mean audits to DQ | Stddev audits to DQ | |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
0.01 | 3000 | 0.95 | 1 | 0 | 1 | -1 | 0.8 | 1 | 10000 | 4.27 | 97 | 819 | |
0.02 | 3000 | 0.95 | 1 | 0 | 1 | -1 | 0.8 | 1 | 10000 | 11.03 | 944 | 2276 | |
0.03 | 3000 | 0.95 | 1 | 0 | 1 | -1 | 0.8 | 1 | 10000 | 27.73 | 2563 | 3248 | |
0.04 | 3000 | 0.95 | 1 | 0 | 1 | -1 | 0.8 | 1 | 10000 | 61.62 | 3098 | 3139 | |
0.05 | 3000 | 0.95 | 1 | 0 | 1 | -1 | 0.8 | 1 | 10000 | 93.24 | 2328 | 2565 | |
0.06 | 3000 | 0.95 | 1 | 0 | 1 | -1 | 0.8 | 1 | 10000 | 99.77 | 1192 | 1544 | |
0.07 | 3000 | 0.95 | 1 | 0 | 1 | -1 | 0.8 | 1 | 10000 | 100.00 | 571 | 802 | |
0.08 | 3000 | 0.95 | 1 | 0 | 1 | -1 | 0.8 | 1 | 10000 | 100.00 | 311 | 457 | |
0.09 | 3000 | 0.95 | 1 | 0 | 1 | -1 | 0.8 | 1 | 10000 | 100.00 | 189 | 281 |
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
#!/usr/bin/env python3 | |
# | |
# This is meant to act as a double-check of math used elsewhere to calculate the chance | |
# of disqualification given a level of data loss on a storage node. Instead of calculating | |
# the chance algorithmically, this performs a simulation using the specified parameters | |
# and reports how many nodes under the given circumstances would actually be disqualified. | |
import argparse | |
import csv | |
import math |
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
// Copyright (C) 2021 Storj, Inc. | |
// See LICENSE for copying information. | |
package main | |
import ( | |
"context" | |
"crypto/tls" | |
"fmt" | |
"log" |
NewerOlder