Created
January 17, 2018 08:17
-
-
Save FirefoxMetzger/885b1cee0db82ef07c77b228edcbf4a1 to your computer and use it in GitHub Desktop.
How to insert scores to scoreboard
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 | |
# to be filled in by you | |
token = "" # if you have signed up at https://scoreboard-190810.appspot.com | |
# you can find it on the top left corner of the page | |
environment = "Test-v0" # name of the environment the agent is for | |
data = { | |
"name": "My Agent Name", # you wrote it, you get to name it =) | |
"score": "1337", # replace with actual score | |
"source_code": "https://github.com", # a link to the source code (if applicable) | |
"reference": "https://github.com" # a link to further information (paper, blog post, ...) | |
} | |
# construct query and upload | |
header = {"Authorization": "token "+ token} | |
url= "https://scoreboard-190810.appspot.com/v1/environment/ByName/"+environment | |
r = requests.post(url, json=data, headers=header) | |
print(r.text) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment