Authors | Jack McPherson <jack.mcpherson@mycelium.ventures> |
Version | 0.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
if math.fabs(arb) > avg: | |
percs[coinarbs[arb].split('-')[0]] = arb / t | |
if coinarbs[arb] in usdpos: #-0.3 * 10 * 100 + 360 #-0.16*400*10+1826=1186 | |
#-0.16*400*10-266=-906 | |
wanting[coinarbs[arb]] = arb / t * 7.5 * balance | |
wanting[coinarbs[arb]] = wanting[coinarbs[arb]] * -1 | |
wanting[coinarbs[arb]] = wanting[coinarbs[arb]] - usdpos[coinarbs[arb]] | |
else: | |
wanting[coinarbs[arb]] = arb / t * 7.5 * balance |
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
import requests | |
from xml.etree import ElementTree | |
m = requests.get('https://medium.com/feed/@jarettdunn').text | |
#print(m) | |
root = ElementTree.fromstring (m) | |
#root = ElementTree.fromstring(m) | |
strings = [] |
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
def extract_submissions(fld_bz2, fld_split, which, size=2e5): | |
path_in = fld_bz2 + '/RS_%s.bz2'%args.dump_name | |
n = 0 | |
m = 0 | |
n2 = 0 | |
m2 = 0 | |
sub = 0 | |
sid2 = [] | |
sids = [] |
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
def powers(num): | |
if num > 1: | |
for i in range(2,num): | |
if (num % i) == 0: | |
#print(num,"is not a prime number") | |
#print(i,"times",num//i,"is",num) | |
return(powers(num+1)) | |
else: | |
print(str(num) + " is a prime number") |
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
def isprime(num): | |
if num > 1: | |
for i in range(2,num): | |
if (num % i) == 0: | |
#print(num,"is not a prime number") | |
#print(i,"times",num//i,"is",num) | |
return(isprime(num+1)) | |
else: | |
print(str(num) + " is a prime number") |
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
from web3 import Web3 | |
w3= Web3(Web3.HTTPProvider("https://mainnet.infura.io/v3/yourkey", request_kwargs={'timeout': 60})) | |
from web3.gas_strategies.time_based import construct_time_based_gas_price_strategy | |
time_based_gas_price_strategy = construct_time_based_gas_price_strategy( | |
9, 120, 98 | |
) | |
w3.eth.set_gas_price_strategy(time_based_gas_price_strategy) | |
actual = w3.eth.generate_gas_price() | |
print(actual) |
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
from web3 import Web3 | |
from web3 import middleware | |
from web3.gas_strategies.time_based import medium_gas_price_strategy, fast_gas_price_strategy, slow_gas_price_strategy | |
from web3.gas_strategies.rpc import rpc_gas_price_strategy | |
w3= Web3(Web3.HTTPProvider("https://mainnet.infura.io/v3/yourkey", request_kwargs={'timeout': 60})) | |
w3.eth.setGasPriceStrategy(rpc_gas_price_strategy) | |
print('RPC:', w3.eth.generateGasPrice()) | |
w3.eth.setGasPriceStrategy(slow_gas_price_strategy) |
Authors | Jack McPherson <jack.mcpherson@mycelium.ventures> |
Version | 0.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
async def doStuff(urls): | |
global ohlcvs, toms | |
dodo = True | |
mosts = {} | |
leasts = {} | |
tss = {} | |
if urls == None: | |
urls = [] |