code stringlengths 3 6.57k |
|---|
time.time() |
print("elapsed_time: {0}".format(elapsed_time) |
open('power_quintet.txt', 'w') |
f.write(json.dumps(result) |
logging.getLogger(__name__) |
async_setup_entry(hass, config_entry, async_add_entities) |
SENSOR_TYPES.items() |
async_add_entities(dev, True) |
GlancesSensor(Entity) |
name(self) |
unique_id(self) |
icon(self) |
unit_of_measurement(self) |
available(self) |
state(self) |
should_poll(self) |
async_added_to_hass(self) |
_schedule_immediate_update(self) |
self.async_schedule_update_ha_state(True) |
will_remove_from_hass(self) |
self.unsub_update() |
async_update(self) |
round(disk["used"] / 1024 ** 3, 1) |
round(disk["free"] / 1024 ** 3, 1) |
round(value["mem"]["used"] / 1024 ** 2, 1) |
round(value["mem"]["free"] / 1024 ** 2, 1) |
round(value["memswap"]["used"] / 1024 ** 3, 1) |
round(value["memswap"]["free"] / 1024 ** 3, 1) |
round(cpu_use, 1) |
round(mem_use / 1024 ** 2, 1) |
os.path.abspath(os.curdir) |
Flask(__name__) |
get_rooms() |
open('codec/codec.json') |
json.load(data_file) |
get_surveys() |
datetime.datetime.now() |
now.strftime("%Y-%m") |
format(now_str) |
format(now_str) |
open(surveycsv) |
csv.DictReader(f, skipinitialspace=True) |
list(reader) |
open(surveyjson, 'w') |
data_file.write(json.dumps(rows, sort_keys=True, indent=4, separators=(',', ': ') |
open(surveyjson) |
json.load(data_file) |
bot.route('/') |
hello() |
dashboard() |
bot.route('/rooms', methods=['GET','POST']) |
rooms() |
render_template('rooms.html') |
get_rooms() |
render_template('rooms.html', rooms=rooms) |
bot.route('/surveys', methods=['GET', 'POST']) |
surveys() |
render_template('surveys.html') |
check_surveyfile() |
get_surveys() |
render_template('surveys.html', surveys=surveys) |
bot.route('/dashboard', methods=['GET', 'POST']) |
dashboard() |
open('codec/codec.json') |
json.load(data_file) |
if (codec['NetworkAlert'] == "Yes" or codec['SIPAlert'] == "Yes") |
if (codec['Occupied'] == "Yes") |
if (codec['Call'] == "Yes") |
if (codec['Diag'] == "Errors") |
if (codec['VideoPacketloss'] == "Yes") |
if (codec['AudioPacketloss'] == "Yes") |
render_template('dashboard.html', systemsdown=sytemsdown, activecalls=activecalls, occupiedrooms=occupiedrooms, diagerrors=diagerrors, videopacketloss=videopacketloss, audiopacketloss=audiopacketloss, roomnum=roomnum) |
bot.route('/surveygraph', methods=['GET', 'POST']) |
surveygraph() |
check_surveyfile() |
datetime.datetime.now() |
now.strftime("%Y-%m") |
format(now_str) |
open(surveyjson) |
json.load(data_file) |
if (codec['Quality'] == "Excellent") |
if (codec['Quality'] == "Good") |
if (codec['Quality'] == "Poor") |
if (codec['Quality'] == "No response") |
render_template('surveygraph.html', numexcellent=numexcellent, numgood=numgood, numpoor=numpoor, numnone=numnone) |
bot.route('/codec', methods=['POST']) |
receivepostfromcodec() |
open(log, "a") |
f.write("\n") |
f.write(request.data) |
check_surveyfile() |
datetime.datetime.now() |
now.strftime("%Y-%m") |
format(now_str) |
json.loads(request.data) |
print("Received status call: {}".format(action) |
open('codec/codec.json', 'r') |
json.load(data_file) |
if (codec['SystemName'] == name) |
if (codec['IP'] == host) |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.