Created
July 27, 2020 17:11
-
-
Save microprediction/7b1bcaae0eb012c5a51f0c2ce9c81246 to your computer and use it in GitHub Desktop.
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 microprediction import MicroWriter | |
import time | |
from pprint import pprint | |
import numpy as np | |
# Enters all the z1 streams | |
# This might be run once a day, say. | |
from microprediction import new_key | |
WRITE_KEY = new_key(difficulty=10) | |
ANIMAL = MicroWriter.animal_from_key(WRITE_KEY) | |
print(ANIMAL) | |
if __name__=="__main__": | |
mw = MicroWriter(write_key=WRITE_KEY) | |
LONG = '~'+str(mw.DELAYS[-1]) | |
SHORT = '~'+str(mw.DELAYS[0]) | |
for name in mw.get_streams(): | |
if 'z1~' in name and LONG in name or SHORT in name: | |
num = mw.num_predictions | |
prtcls = list( np.linspace(start=1/(2*num),stop=1-1/(2*num), num=num)) | |
values = [ mw.norminv(p) for p in prtcls ] | |
pprint(mw.submit(name=name,values=values)) | |
time.sleep(7.28) | |
print(' ',flush=True) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment