<s> """<STR_LIT>""" <EOL> """<STR_LIT>""" <EOL> def get_supported_apps ( ) : <EOL> """<STR_LIT>""" <EOL> next_path = '<STR_LIT>' <EOL> app_module = __import__ ( next_path , fromlist = [ '<STR_LIT>' ] ) <EOL> return app_module . implemented_apps <EOL> def get_app_about ( app_id ) : <EOL> """<STR_LIT>""" <EOL> app_id = str ( app_id ) <EOL> next_path = '<STR_LIT>' <EOL> app_module = __import__ ( next_path + app_id , fromlist = [ '<STR_LIT>' ] ) <EOL> return app_module . get_about ( ) <EOL> def get_app_info_object ( app_id ) : <EOL> """<STR_LIT>""" <EOL> app_id = str ( app_id ) <EOL> next_path = '<STR_LIT>' <EOL> app_module = __import__ ( next_path + app_id , fromlist = [ '<STR_LIT>' ] ) <EOL> return app_module . get_info_object ( ) <EOL> def get_app_default_instructions ( app_id ) : <EOL> """<STR_LIT>""" <EOL> app_id = str ( app_id ) <EOL> next_path = '<STR_LIT>' <EOL> app_module = __import__ ( next_path + app_id , fromlist = [ '<STR_LIT>' ] ) <EOL> return app_module . get_default_instructions ( ) <EOL> def get_app_default_debrief ( app_id ) : <EOL> """<STR_LIT>""" <EOL> app_id = str ( app_id ) <EOL> next_path = '<STR_LIT>' <EOL> app_module = __import__ ( next_path + app_id , fromlist = [ '<STR_LIT>' ] ) <EOL> return app_module . get_default_debrief ( ) <EOL> def get_app_default_num_tries ( app_id ) : <EOL> """<STR_LIT>""" <EOL> app_id = str ( app_id ) <EOL> next_path = '<STR_LIT>' <EOL> app_module = __import__ ( next_path + app_id , fromlist = [ '<STR_LIT>' ] ) <EOL> return app_module . get_default_num_tries ( ) <EOL> def get_app ( app_id ) : <EOL> """<STR_LIT>""" <EOL> app_id = str ( app_id ) <EOL> next_path = '<STR_LIT>' <EOL> app_module = __import__ ( next_path + app_id , fromlist = [ '<STR_LIT>' ] ) <EOL> app_class = getattr ( app_module , app_id ) <EOL> return app_class ( ) <EOL> def get_app_alg ( app_id , alg_id ) : <EOL> """<STR_LIT>""" <EOL> app_id = str ( app_id ) <EOL> alg_id = str ( alg_id ) <EOL> next_path = '<STR_LIT>' + app_id + '<STR_LIT>' <EOL> alg_module = __import__ ( next_path + alg_id , fromlist = [ '<STR_LIT>' ] ) <EOL> alg_class = getattr ( alg_module , alg_id ) <EOL> return alg_class ( ) <EOL> def get_app_supported_algs ( app_id ) : <EOL> """<STR_LIT>""" <EOL> app_id = str ( app_id ) <EOL> next_path = '<STR_LIT>' <EOL> app_module = __import__ ( next_path + app_id , fromlist = [ '<STR_LIT>' ] ) <EOL> return app_module . get_implemented_algs ( ) <EOL> def get_app_supported_stats ( app_id ) : <EOL> """<STR_LIT>""" <EOL> app_id = str ( app_id ) <EOL> next_path = '<STR_LIT>' + app_id + '<STR_LIT:.>' <EOL> dashboard_module = __import__ ( next_path + '<STR_LIT>' , fromlist = [ '<STR_LIT>' ] ) <EOL> dashboard_class = getattr ( dashboard_module , app_id + '<STR_LIT>' ) <EOL> dashboard = dashboard_class ( ) <EOL> return dashboard . get_app_supported_stats ( ) <EOL> def get_app_default_alg_list ( app_id ) : <EOL> """<STR_LIT>""" <EOL> app_id = str ( app_id ) <EOL> next_path = '<STR_LIT>' <EOL> app_module = __import__ ( next_path + app_id , fromlist = [ '<STR_LIT>' ] ) <EOL> return app_module . get_default_alg_list ( ) <EOL> """<STR_LIT>""" <EOL> def getDocUID ( exp_uid , alg_uid = None ) : <EOL> """<STR_LIT>""" <EOL> if alg_uid == None : <EOL> return exp_uid <EOL> else : <EOL> return exp_uid + "<STR_LIT:->" + alg_uid <EOL> import os <EOL> def getNewUID ( ) : <EOL> """<STR_LIT>""" <EOL> uid = os . urandom ( <NUM_LIT:16> ) . encode ( '<STR_LIT>' ) <EOL> return uid <EOL> """<STR_LIT>""" <EOL> from datetime import datetime <EOL> def datetimeNow ( format = '<STR_LIT>' ) : <EOL> """<STR_LIT>""" <EOL> date = datetime . now ( ) <EOL> if format == '<STR_LIT:string>' : <EOL> return datetime2str ( date ) <EOL> else : <EOL> return date <EOL> def datetime2filename ( obj_datetime ) : <EOL> """<STR_LIT>""" <EOL> return obj_datetime . strftime ( "<STR_LIT>" ) <EOL> def datetime2str ( obj_datetime ) : <EOL> """<STR_LIT>""" <EOL> return str ( obj_datetime ) <EOL> def str2datetime ( str_time ) : <EOL> """<STR_LIT>""" <EOL> try : <EOL> return datetime . strptime ( str_time , '<STR_LIT>' ) <EOL> except : <EOL> return datetime . strptime ( str_time , '<STR_LIT>' ) <EOL> import time <EOL> def timeit ( f ) : <EOL> """<STR_LIT>""" <EOL> def timed ( * args , ** kw ) : <EOL> ts = time . time ( ) <EOL> result = f ( * args , ** kw ) <EOL> te = time . time ( ) <EOL> if type ( result ) == tuple : <EOL> return result + ( ( te - ts ) , ) <EOL> else : <EOL> return result , ( te - ts ) <EOL> return timed </s>
