code stringlengths 3 6.57k |
|---|
data.append(entry) |
json.dumps(data) |
open('codec/codec.json', 'w') |
data_file.write(json.dumps(data, sort_keys=True, indent=4, separators=(',', ': ') |
json.loads(request.data) |
print("Received status call: {}".format(action) |
if (action == "LocalDisconnect" or action == "RemoteDisconnect") |
send_survey(host) |
json.loads(request.data) |
if (widget == "widget_1" and action == "clicked") |
send_dial(host) |
json.loads(request.data) |
if (action == "1") |
get_last(ip) |
open(surveycsv, 'a') |
if (response == "1") |
outFilecsv.write("\n") |
outFilecsv.write(calldetail) |
elif (response == "2") |
outFilecsv.write("\n") |
outFilecsv.write(calldetail) |
elif (response == "3") |
outFilecsv.write("\n") |
outFilecsv.write(calldetail) |
outFilecsv.write("\n") |
outFilecsv.write(calldetail) |
outFilecsv.close() |
open('codec/codec.json', 'r') |
json.load(data_file) |
if (codec['IP'] == ip) |
open('codec/codec.json', 'w') |
data_file.write(json.dumps(data, sort_keys=True, indent=4, separators=(',', ': ') |
make_response("ok") |
make_response("ok") |
check_surveyfile() |
datetime.datetime.now() |
now.strftime("%Y-%m") |
format(now_str) |
os.path.exists(surveycsv) |
open(surveycsv, 'w') |
outFile.close() |
check_status() |
threading.Timer(30.0, check_status) |
start() |
open('codec/codec.json', 'r') |
json.load(data_file) |
get_status(codec['IP']) |
get_sip(codec['IP']) |
get_people(codec['IP']) |
get_loss(codec['IP']) |
get_diag(codec['IP']) |
if (video == "N/A" and audio == "N/A") |
if (diagstatus != "None") |
if (codec['Status'] == "Down" and codec['NetworkAlert'] == "No") |
send_email(sub, bod) |
elif (codec['Status'] != "Down" and codec['NetworkAlert'] == "Yes") |
send_email(sub, bod) |
elif (codec['SIP'] != "Registered" and codec['SIPAlert'] == "No") |
send_email(sub, bod) |
elif (codec['SIP'] == "Registered" and codec['SIPAlert'] == "Yes") |
send_email(sub, bod) |
open('codec/codec.json', 'w') |
data_file.write(json.dumps(data, sort_keys=True, indent=4, separators=(',', ': ') |
codec_register() |
open('codec/codec.json', 'r') |
json.load(data_file) |
send_register(codec['IP']) |
send_email(subject, body) |
join(TO) |
smtplib.SMTP_SSL(SERVER, 465) |
server_ssl.ehlo() |
login() |
server_ssl.login(email_user, email_pwd) |
server_ssl.starttls() |
server_ssl.sendmail(FROM, TO, message) |
server_ssl.quit() |
server_ssl.close() |
check_status() |
codec_register() |
bot.run(host='0.0.0.0', port=5000) |
bot.run(ssl_context=('cert.pem', 'key.pem') |
logging.getLogger(__name__) |
logger.debug("Creating external repo %s@%s", url, rev) |
_cached_clone(url, rev, for_write=for_write) |
_get_cache_dir(url) |
_get_remote_config(url) |
os.path.isdir(url) |
config.update(cache_config) |
make_repo(path, **_kwargs) |
cache_config.copy() |
os.path.isdir(url) |
os.path.relpath(path, _kwargs["scm"].root_dir) |
os.path.join(url, rel) |
_config.update(_get_remote_config(repo_path) |
Repo(path, config=_config, **_kwargs) |
os.path.realpath(path) |
Git(root_dir) |
Repo(**repo_kwargs) |
NoRemoteInExternalRepoError(url) |
PathMissingError(exc.path, url) |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.