Skip to content

Instantly share code, notes, and snippets.

@FirefoxMetzger
Created January 17, 2018 08:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save FirefoxMetzger/885b1cee0db82ef07c77b228edcbf4a1 to your computer and use it in GitHub Desktop.
Save FirefoxMetzger/885b1cee0db82ef07c77b228edcbf4a1 to your computer and use it in GitHub Desktop.
How to insert scores to scoreboard
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