Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
:param s: input string
:type s: str
:return: result as bool
"""
try:
if sys.version_info.major == 3:
_ = bytes(s, 'utf-8').decode('utf-8', 'strict')
else:
return True
return True
except Exception:
return False
if __name__ == "__main__":
art.tprint("Font Wizard")
print("Use this string as input for font resource : ")
print(Letters)
print("*" * 30)
font_data = input("Please enter font data (string or list) : ")
if not is_utf8(font_data):
print(Error5)
sys.exit()
if len(font_data) == 0:
print(Error1)
sys.exit()
if len(font_data) != len(Letters):
try:
font_data = ast.literal_eval(font_data)
if len(font_data) != len(Letters):
print(Error2)
sys.exit()
if "TEST" in ARGSUP:
try:
EXIT_CODE = 0
for item in Test_List:
EXIT_CODE += doctest.testfile(os.path.join("Test",item), optionflags=doctest.NORMALIZE_WHITESPACE | doctest.ELLIPSIS, verbose=False)[0]
if EXIT_CODE == 0 :
print("Test passed!")
else:
print("Test failed!")
sys.exit(EXIT_CODE)
except Exception:
print("Test folder not found!!")
sys.exit(1)
check_update(Version)
while not EXITFLAG:
tprint("OPEM")
tprint("v" + str(Version))
print(Description_Menu["Links"])
description_print("Overview", Description_Menu)
tprint("Models",font="larry3d")
for i, item in enumerate(MENUKEYS):
print(str(i + 1) + "-" + item)
try:
ANALYSISINDEX = int(input(("\nPlease Choose Model : ")))
except Exception:
ANALYSISINDEX = -1
if ANALYSISINDEX - 1 in range(len(MENUKEYS)):
ANALYSISNAME = MENUKEYS[ANALYSISINDEX - 1]
description_print(ANALYSISNAME, Description_Menu)
USERINPUT = input(
"\nEnter [M]: More Information,[T]: Run Standard Test Vector or any other key to "
"continue \n")
def get_input(func_1=input,func_2=input):
tprint("git\nfollow")
username = func_1("Please Enter Your Github Username : ")
keys=func_2("1- Collecting Stars Information\n2- Collecting Repos Information\n3- Collecting Organizations Information (Enter Number Seperated By , )")
keys=keys.split(",")
return [username,keys]
def run(func_1=input,func_2=input,func_3=input):
json_to_pickle(file_name)
filesize(file_name + SUFFIX_MENU[input_dict["output_format"]])
second_time = time.perf_counter()
elapsed_time = second_time - first_time
elapsed_time_format = time_convert(str(elapsed_time))
print("Graph Generated In " + elapsed_time_format)
print("Where --> " + SOURCE_DIR)
logger(
vertices_number,
edge_number,
file_name + ".gr",
elapsed_time_format)
if __name__ == "__main__":
tprint("Pyrgg", "larry3d")
tprint("v" + PYRGG_VERSION)
description_print()
args = sys.argv
if len(args) > 1:
if args[1].upper() == "TEST":
error_flag = doctest.testfile("test.py", verbose=False)[0]
sys.exit(error_flag)
else:
print("Bad Input!")
print("Test (Run doctest)")
print("Without arg --> Normal Run")
else:
EXIT_FLAG = False
while not EXIT_FLAG:
run()
INPUTINDEX = str(
def TIR_help_func():
'''
Print Help Page
:return: None
'''
tprint("telecheck")
tprint("v"+version)
print("You can use a-z,0-9 and underscores: \n")
print("Help : \n")
print(" - all 'your_keywords' --> (All Users) Example : 'python -m telecheck all keyword1,keyword2,keyword3'\n")
print(" - bot 'your_keywords' --> (Bot Users) Example : 'python -m telecheck bot keyword1,keyword2,keyword3'\n")
def TIR_help_func():
'''
Print Help Page
:return: None
'''
tprint("telecheck")
tprint("v"+version)
print("You can use a-z,0-9 and underscores: \n")
print("Help : \n")
print(" - all 'your_keywords' --> (All Users) Example : 'python -m telecheck all keyword1,keyword2,keyword3'\n")
print(" - bot 'your_keywords' --> (Bot Users) Example : 'python -m telecheck bot keyword1,keyword2,keyword3'\n")
def TIR_help_func():
'''
Print Help Page
:return: None
'''
tprint("telecheck")
tprint("v"+version)
print("You can use a-z,0-9 and underscores: \n")
print("Help : \n")
print(" - all 'your_keywords' --> (All Users) Example : 'python -m telecheck all keyword1,keyword2,keyword3'\n")
print(" - bot 'your_keywords' --> (Bot Users) Example : 'python -m telecheck bot keyword1,keyword2,keyword3'\n")
def version():
"""
Return orangetool version.
:return: return orangetool-version number as string
"""
tprint("orangetool", font="bulbhead")
tprint("v"+VERSION,font="bulbhead")