mirror of
https://github.com/balkian/gists.git
synced 2024-12-23 14:58:11 +00:00
Add 'repos/1462976b537a1d661e1d/' from commit '32627f8dd7e5d140c24db3dc1b6a0c5f871e2ea8'
git-subtree-dir: repos/1462976b537a1d661e1d git-subtree-mainline:7a9c1f28a4
git-subtree-split:32627f8dd7
This commit is contained in:
commit
3111b48793
24
repos/1462976b537a1d661e1d/kemsirve.py
Normal file
24
repos/1462976b537a1d661e1d/kemsirve.py
Normal file
@ -0,0 +1,24 @@
|
||||
from __future__ import print_function
|
||||
|
||||
import requests
|
||||
try:
|
||||
import Tkinter as tk
|
||||
import tkMessageBox as tkm
|
||||
except Exception:
|
||||
import tkinter as tk
|
||||
from tkinter import messagebox as tkm
|
||||
|
||||
|
||||
window = tk.Tk()
|
||||
window.wm_withdraw()
|
||||
|
||||
resp = requests.get("https://ws.ovh.com/dedicated/r2/ws.dispatcher/getAvailability2")
|
||||
for i in resp.json()["answer"]["availability"]:
|
||||
if i["reference"] in ["150sk10", "150sk20"]:
|
||||
for j in i["metaZones"]:
|
||||
if j["availability"] not in ["unavaible", "unknown"]:
|
||||
print(j["zone"], j["availability"])
|
||||
tkm.showinfo(title="Greetings",
|
||||
message="%s: %s - %s!" % (i["reference"],
|
||||
j["zone"],
|
||||
j["availability"]))
|
1
repos/1462976b537a1d661e1d/watch.sh
Normal file
1
repos/1462976b537a1d661e1d/watch.sh
Normal file
@ -0,0 +1 @@
|
||||
watch -n 60 python kemsirve.py
|
Loading…
Reference in New Issue
Block a user