2015-03-01 17:29:34 +01:00
|
|
|
#!/usr/bin/env python3
|
|
|
|
|
2015-03-08 19:48:30 +01:00
|
|
|
import Image
|
|
|
|
import ImageDraw
|
|
|
|
import time
|
|
|
|
|
2015-03-01 17:29:34 +01:00
|
|
|
import requests
|
|
|
|
import json
|
|
|
|
|
|
|
|
r = requests.get('https://spaceapi.syn2cat.lu/status/json')
|
|
|
|
|
|
|
|
obj = json.loads(r.text)
|
|
|
|
|
|
|
|
presence = obj["sensors"]["people_now_present"][0]["value"]
|
|
|
|
|
|
|
|
|
|
|
|
if obj["state"]["open"]:
|
|
|
|
print("And we are open!")
|
|
|
|
print("There are {} Hackers present NOW!".format(presence))
|