Skip to content

Instantly share code, notes, and snippets.

Last active January 28, 2016 02:50
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
What would you like to do?
Repeatedly hit the Github status API to see if it's down or not (py2/3 compatible and cross-platform)
from __future__ import print_function
import requests
import os
import time
if == "posix":
def sound():
os.system("play --no-show-progress --null --channels 1 synth 5 sin 440")
import winsound
def sound():
winsound.Beep(440, 5)
print("Is GitHub back yet?")
while True:
req = requests.get("")
if req.json()["status"] != "major":
print("Still down")
print("We", req.json()["status"])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment