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 <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){ |
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
# 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): |
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
PASTEBIN | |
new paste | |
API tools faq deals | |
Guest User | |
- | |
Public Pastes | |
Untitled9 sec ago |
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
[{'blocktime': 1535418376, | |
'confirmations': 53, | |
'data': {'size': 58941, | |
'txid': '0187f071a4d647fa9a6621f37697da3abc460ee3d1386316b1e7c8eac5c07f9d', | |
'vout': 0}, | |
'key': '304403', | |
'publishers': ['18a4CbHPbp61wdifHp12TQEEm1yPKSAD5gkC9M'], | |
'txid': '0187f071a4d647fa9a6621f37697da3abc460ee3d1386316b1e7c8eac5c07f9d'}, | |
{'blocktime': 1535418761, | |
'confirmations': 27, |
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
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 |