Skip to content

Instantly share code, notes, and snippets.

Avatar
👽

Ali Haydari TinfoilHat0

👽
View GitHub Profile
View Streams_in_parallel.py
api = Savoir(rpcuser, rpcpassword, rpchost, rpcport, chainName)
def fetchParallel(streamName, streamLen):
p = mp.Pool(processes=2)
args = [(streamName, False, streamLen, streamLen//2), (streamName False, streamLen//2, 0)]
start = time()
p.starmap(api.liststreamitems, args)
end = time()
return end-start
View gist:98227ca89ab2e55c66c058b36a3bd79b
[{'blocktime': 1535418376,
'confirmations': 53,
'data': {'size': 58941,
'txid': '0187f071a4d647fa9a6621f37697da3abc460ee3d1386316b1e7c8eac5c07f9d',
'vout': 0},
'key': '304403',
'publishers': ['18a4CbHPbp61wdifHp12TQEEm1yPKSAD5gkC9M'],
'txid': '0187f071a4d647fa9a6621f37697da3abc460ee3d1386316b1e7c8eac5c07f9d'},
{'blocktime': 1535418761,
'confirmations': 27,
View gist:ebda0451c2f4f2b7dfdf7a632e8e5984
PASTEBIN
new paste
API tools faq deals
Guest User
-
Public Pastes
Untitled9 sec ago
View loadTimes.py
# coding: utf-8
import Savoir
import random
import string
from timeit import default_timer as timer
# All values must be in hex before stored in Multichain
def hexlify(s):
return s.encode().hex()
def unhexlify(s):
View LoadTimes.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View letter_mystery.cpp
#include <cmath>
#include <cstdio>
#include <vector>
#include <iostream>
#include <algorithm>
using namespace std;
int palCount(string str){
int i = 0, j = str.length() - 1, cnt = 0;
while(i < j){