Last active
          December 8, 2016 19:59 
        
      - 
      
 - 
        
Save nicolasH/6102105 to your computer and use it in GitHub Desktop.  
Revisions
- 
        
nicolasH revised this gist
Aug 17, 2013 . 1 changed file with 5 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -3,16 +3,19 @@ import requests from bs4 import BeautifulSoup from datetime import datetime # # Check the status of the Apple Dev Center systems. # Offline systems appear in orange # Online systems appear in black # # Author: Nicolas HOIBIAN | @nico_h | www.niconomicon.net # License: Creative Common By-NC-SA # # @viticci on twitter created a version that uses the Pythonista notification module for timely reminders: # http://www.macstories.net/linked/check-dev-center-status-from-ios-with-pythonista/ # # url fetching activity indicator courtesy of @fcrespo82 on twitter #https://gist.github.com/fcrespo82/5b9b35bc8a0a62c7ec1a console.clear() console.set_font("Futura", 16)  - 
        
nicolasH revised this gist
Aug 17, 2013 . 1 changed file with 18 additions and 14 deletions.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -1,24 +1,24 @@ import sys import console import requests from bs4 import BeautifulSoup from datetime import datetime # Check the status of the Apple Dev Center systems. # Offline systems appear in orange # Online systems appear in black # # Author: Nicolas HOIBIAN | @nico_h | www.niconomicon.net # License: Creative Common By-NC-SA # # @viticci created a version that uses the Pythonista notification module for timely reminders: # http://www.macstories.net/linked/check-dev-center-status-from-ios-with-pythonista/ console.clear() console.set_font("Futura", 16) console.set_color(0, 0, 0) print "Fetching DevCenter status" print datetime.now().strftime("%Y/%m/%d %H:%M:%S (local time)") url="https://developer.apple.com/support/system-status/" console.show_activity() resp = requests.get(url) @@ -29,14 +29,18 @@ down = 0 up = 0 # Data Last Updated on apple server for h2 in soup.find_all("h2"): print "Data Last", h2.text print "_______________________" for td in soup.find_all("td"): if td["class"][0] == "offline": console.set_color(1, 0.5, 0) down+=1 else: console.set_color(0, 0, 0) up+=1 print td.text console.set_color(0, 0, 0) print "_______________________"  - 
        
nicolasH revised this gist
Aug 17, 2013 . 1 changed file with 7 additions and 7 deletions.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -14,11 +14,11 @@ # http://www.macstories.net/linked/check-dev-center-status-from-ios-with-pythonista/ console.clear() console.set_font("Futura", 16) console.set_color(0, 0, 0) print "Fetching DevCenter status" print datetime.now().strftime("%Y/%m/%d %H:%M:%S") print "_______________________" url="https://developer.apple.com/support/system-status/" console.show_activity() resp = requests.get(url) @@ -29,8 +29,8 @@ down = 0 up = 0 for td in soup.find_all("td"): if td["class"][0] == "offline": console.set_color(1, 0.5, 0) down+=1 else: @@ -39,8 +39,8 @@ print td.text console.set_color(0, 0, 0) print "_______________________" console.set_color(1, 0.5, 0) print "Offline:", down console.set_color(0, 0, 0) print "Online:", up  - 
        
nicolasH revised this gist
Aug 17, 2013 . 1 changed file with 26 additions and 9 deletions.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -2,24 +2,41 @@ import requests import console import sys import notification from datetime import datetime # Check the status of the Apple Dev Center systems. # # Author: Nicolas HOIBIAN | @nico_h | www.niconomicon.net # License: Creative Common By-NC-SA # # @viticci has a version that uses the notification module for timely reminders: # http://www.macstories.net/linked/check-dev-center-status-from-ios-with-pythonista/ console.clear() console.set_font('Futura', 16) console.set_color(0, 0, 0) print "Fetching DevCenter status" print datetime.now().strftime("%Y/%m/%d %H:%M:%S") print '_______________________' url="https://developer.apple.com/support/system-status/" console.show_activity() resp = requests.get(url) console.hide_activity() html_doc = resp.text soup = BeautifulSoup(html_doc) down = 0 up = 0 for td in soup.find_all('td'): if td['class'][0] == 'offline': console.set_color(1, 0.5, 0) down+=1 else: console.set_color(0, 0, 0) up+=1 print td.text console.set_color(0, 0, 0) print '_______________________'  - 
        
nicolasH created this gist
Jul 29, 2013 .There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,29 @@ from bs4 import BeautifulSoup import requests import console import sys url="https://developer.apple.com/support/system-status/" resp = requests.get(url) html_doc = resp.text soup = BeautifulSoup(html_doc) console.clear() console.set_font('Futura', 16) down = 0 up = 0 for td in soup.find_all('td'): if td['class'][0] == 'offline': console.set_color(1, 0.5, 0) down+=1 else: console.set_color(0, 0, 0) up+=1 print td.text console.set_color(0, 0, 0) print '_______________________' console.set_color(1, 0.5, 0) print 'Offline:',down console.set_color(0, 0, 0) print 'Online:',up