Created
February 18, 2020 18:14
-
-
Save microprediction/3acbd63425dc943dd4f79e0aacac0270 to your computer and use it in GitHub Desktop.
Supercollider submission example
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 Algorithmia | |
import numpy as np | |
import json | |
# Only works inside Algorithmia, but easily modified | |
sc_pred = Algorithmia.client().algo('microprediction/sc_predict') | |
NUM_PREDICTIONS = Algorithmia.client().algo('micropredictoin/sc_num').pipe("").result | |
write_key = json.loads("data://.my/threeza_private/write_key.json").getString())['key'] | |
scenarios = sorted(list(np.random.randn(NUM_PREDICTIONS)) | |
predictions = {"name":"cop.json","write_key":write_key,"values":scenarios} | |
submission = sc_pred.pipe(predictions).result | |
def apply(input): | |
return "Hey you need not have called but thanks for the 1000 credits" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment