Module Expr Str Import alias Import alias Import alias Import alias ImportFrom alias alias ImportFrom alias alias alias ImportFrom alias Import alias Import alias FunctionDef arguments args NameParam defaults body For NameStore NameLoad body If UnaryOpNot Call AttributeLoad NameLoad attr NameLoad body Expr Call AttributeLoad NameLoad attr Call AttributeLoad Str attr NameLoad Return NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Assign NameStore Call NameLoad NameLoad For NameStore NameLoad body TryExcept body Expr Call NameLoad NameLoad handlers ExceptHandler type NameLoad name NameStore body Raise Expr Call NameLoad Num decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore ListLoad For NameStore NameLoad body Assign NameStore Call AttributeLoad Call NameLoad NameLoad Str attr Assign NameStore Call AttributeLoad NameLoad attr NameLoad If Call NameLoad NameLoad NameLoad body AugAssignAdd NameStore NameLoad orelse If Call NameLoad NameLoad NameLoad body Expr Call AttributeLoad NameLoad attr NameLoad orelse Expr Call AttributeLoad NameLoad attr Call AttributeLoad Str attr NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore AttributeLoad NameLoad attr Assign NameStore AttributeLoad NameLoad attr If UnaryOpNot Call NameLoad NameLoad body Return Assign NameStore Dict Str Str Str Str Str Str Str Str Assign NameStore Dict Str Str Str NameLoad Assign NameStore ListLoad Str Str Str Str Str Assign NameStore Call NameLoad NameLoad Assign NameStore Str FunctionDef arguments args NameParam NameParam defaults body For NameStore NameLoad body If CompareEq Call AttributeLoad NameLoad attr Str NameLoad body Return Call AttributeLoad NameLoad attr Str decorator_list For NameStore NameLoad body If Call AttributeLoad NameLoad attr Str body Assign NameStore Dict For TupleStore NameStore NameStore Call AttributeLoad SubscriptLoad NameLoad Index Str attr body Assign NameStore Call NameLoad NameLoad NameLoad Assign SubscriptStore NameLoad Index NameLoad NameLoad Assign SubscriptStore NameLoad Index Str NameLoad For NameStore NameLoad body If CompareNotIn Str NameLoad body Assign SubscriptStore NameLoad Index Str Str For NameStore Call NameLoad Call AttributeLoad NameLoad attr body If CompareIn NameLoad NameLoad body Assign SubscriptStore NameLoad Index SubscriptLoad NameLoad Index NameLoad SubscriptLoad NameLoad Index NameLoad If CompareIn NameLoad NameLoad body Assign SubscriptStore NameLoad Index NameLoad SubscriptLoad NameLoad Index NameLoad If BoolOpOr CompareIn NameLoad NameLoad CompareIn NameLoad NameLoad body Expr Call AttributeLoad NameLoad attr NameLoad NameLoad AugAssignAdd NameStore BinOpAdd Call AttributeLoad NameLoad attr NameLoad Str Expr Call AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr keyword NameLoad For NameStore NameLoad body If Call AttributeLoad NameLoad attr Str NameLoad body Expr Call AttributeLoad AttributeLoad NameLoad attr attr SubscriptLoad NameLoad Index Str NameLoad decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr keyword NameLoad For NameStore NameLoad body Print Call AttributeLoad Str attr SubscriptLoad NameLoad Index Str IfExp SubscriptLoad NameLoad Index Str Str Str SubscriptLoad NameLoad Index Str decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr For NameStore AttributeLoad NameLoad attr body Expr Call AttributeLoad SubscriptLoad NameLoad Index NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body If CompareEq NameLoad AttributeLoad NameLoad attr body Return NameLoad orelse TryExcept body Return Call NameLoad NameLoad Str handlers ExceptHandler type NameLoad name NameStore body Expr Call AttributeLoad NameLoad attr NameLoad Expr Call NameLoad Num decorator_list FunctionDef arguments args NameParam defaults body If Call NameLoad AttributeLoad NameLoad attr body Expr Call NameLoad AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr For NameStore NameLoad body Expr Call AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam defaults body If Call NameLoad AttributeLoad NameLoad attr body Expr Call NameLoad AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore SubscriptLoad AttributeLoad NameLoad attr Index Num Assign NameStore SubscriptLoad AttributeLoad NameLoad attr Index Num Assign NameStore SubscriptLoad AttributeLoad NameLoad attr Index Num If UnaryOpNot Call AttributeLoad NameLoad attr NameLoad body Expr Call AttributeLoad NameLoad attr Call AttributeLoad Str attr NameLoad Expr Call NameLoad NameLoad If UnaryOpNot Call AttributeLoad NameLoad attr NameLoad body Expr Call AttributeLoad NameLoad attr Call AttributeLoad Str attr NameLoad Return For TupleStore NameStore NameStore NameStore Call NameLoad NameLoad body If CompareIn Str NameLoad body Assign NameStore Call AttributeLoad NameLoad attr NameLoad Str Assign NameStore Call AttributeLoad Call NameLoad NameLoad Str attr TryExcept body Assign NameStore Call AttributeLoad NameLoad attr NameLoad handlers ExceptHandler type NameLoad name NameStore body Expr Call AttributeLoad NameLoad attr Call AttributeLoad Str attr keyword NameLoad keyword NameLoad Continue If UnaryOpNot Call NameLoad NameLoad NameLoad body Expr Call AttributeLoad NameLoad attr Call AttributeLoad Str attr NameLoad Continue If CompareNotIn Str NameLoad body Expr Call AttributeLoad NameLoad attr Call AttributeLoad Str attr NameLoad Continue Assign NameStore SubscriptLoad NameLoad Index Str Assign NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad Expr Call AttributeLoad NameLoad attr Call AttributeLoad Str attr NameLoad If CompareNotIn Str NameLoad body Expr Call AttributeLoad NameLoad attr Call AttributeLoad Str attr NameLoad Continue Assign NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad If Call AttributeLoad NameLoad attr NameLoad body Expr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr NameLoad Str NameLoad Expr Call AttributeLoad NameLoad attr Call AttributeLoad Str attr NameLoad TryExcept body Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad handlers ExceptHandler type AttributeLoad AttributeLoad NameLoad attr attr name NameStore body Expr Call AttributeLoad NameLoad attr Call AttributeLoad Str attr NameLoad NameLoad If CompareIn Str NameLoad body Expr Call AttributeLoad NameLoad attr Call AttributeLoad Str attr NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad If Call AttributeLoad NameLoad attr NameLoad body Expr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr NameLoad Str NameLoad Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr For NameStore NameLoad body Expr Call AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args defaults body Assign NameStore Call AttributeLoad NameLoad attr keyword Call AttributeLoad Str attr AttributeLoad AttributeLoad NameLoad attr attr Assign NameStore Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Str Str keyword Str keyword Str Expr Call AttributeLoad NameLoad attr Str Str keyword Str keyword Str Assign NameStore Call AttributeLoad NameLoad attr keyword Str Assign NameStore Call AttributeLoad NameLoad attr Str keyword Str Assign NameStore Call AttributeLoad NameLoad attr keyword Str Assign NameStore Call AttributeLoad NameLoad attr Str keyword Str Expr Call AttributeLoad NameLoad attr Str keyword NameLoad keyword Str Expr Call AttributeLoad NameLoad attr keyword NameLoad Assign NameStore Call AttributeLoad NameLoad attr Str keyword Str Assign NameStore Call AttributeLoad NameLoad attr keyword Str Assign NameStore Call AttributeLoad NameLoad attr Str keyword Str Expr Call AttributeLoad NameLoad attr Str keyword Str keyword Str Expr Call AttributeLoad NameLoad attr keyword NameLoad Assign NameStore Call AttributeLoad NameLoad attr Str keyword Str Expr Call AttributeLoad NameLoad attr Str keyword Num keyword Str Expr Call AttributeLoad NameLoad attr Str keyword Num keyword Str Expr Call AttributeLoad NameLoad attr Str keyword Num keyword Str Expr Call AttributeLoad NameLoad attr keyword NameLoad Assign NameStore Call AttributeLoad NameLoad attr Str keyword Str Expr Call AttributeLoad NameLoad attr keyword NameLoad Assign NameStore Call AttributeLoad NameLoad attr Str keyword Str Expr Call AttributeLoad NameLoad attr Str Str keyword Str keyword Str keyword AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr keyword NameLoad Assign NameStore Call AttributeLoad NameLoad attr Str keyword Str Assign NameStore Call AttributeLoad NameLoad attr keyword Str Assign NameStore Call AttributeLoad NameLoad attr Str keyword Str Expr Call AttributeLoad NameLoad attr Str keyword Str keyword Str Expr Call AttributeLoad NameLoad attr keyword NameLoad Assign NameStore Call AttributeLoad NameLoad attr Str keyword Str Assign NameStore Call AttributeLoad NameLoad attr keyword Str Assign NameStore Call AttributeLoad NameLoad attr Str keyword Str Expr Call AttributeLoad NameLoad attr Str keyword Str keyword Str Expr Call AttributeLoad NameLoad attr keyword NameLoad Assign NameStore Call AttributeLoad NameLoad attr If AttributeLoad NameLoad attr body Expr Call AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr orelse If AttributeLoad NameLoad attr body Expr Call AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr orelse Expr Call AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr If CompareIn Str NameLoad body Expr Call AttributeLoad NameLoad attr NameLoad orelse Expr Call AttributeLoad NameLoad attr decorator_list Expr Call NameLoad
N/A N/A 
Problem management script.
 N/A argparse N/A sys N/A logging N/A api api.common APIException InternalException os path walk makedirs bson json_util N/A shutil N/A glob check_files_exist N/A N/A files N/A N/A N/A f files N/A N/A N/A N/A N/A path isfile f N/A N/A N/A N/A logging critical N/A N/A No such file {} format f N/A False N/A True N/A insert_objects N/A N/A f files N/A N/A N/A objects N/A get_json_objects files N/A obj objects N/A N/A N/A N/A N/A f obj N/A N/A N/A APIException N/A error N/A N/A N/A N/A exit 1 N/A get_json_objects N/A N/A files N/A N/A N/A objects N/A N/A f files N/A N/A contents N/A N/A N/A open f r read N/A data N/A N/A json_util loads contents N/A N/A isinstance data list N/A N/A objects data N/A N/A N/A isinstance data dict N/A N/A N/A N/A objects append data N/A N/A N/A N/A logging warning N/A N/A JSON file {} did not contain an object or list of objects format f N/A objects N/A migrate_problems N/A N/A args N/A N/A N/A files N/A args files N/A output_file N/A args output N/A N/A N/A check_files_exist files N/A N/A N/A migration_key N/A displayname basescore desc relatedproblems name score description related_problems N/A migration_overwrites N/A grader autogen test.py False N/A deletion_key N/A _id pid generator submissiontype devnotes N/A problems N/A get_json_objects files N/A output get_display_name_from_pid N/A N/A problems pid N/A N/A N/A problem problems N/A N/A N/A N/A N/A problem get pid pid N/A N/A N/A N/A problem get displayname N/A N/A problem problems N/A N/A N/A N/A problem get weightmap N/A N/A new_map N/A N/A N/A pid num N/A N/A N/A problem N/A weightmap items N/A N/A name N/A get_display_name_from_pid problems pid N/A N/A new_map N/A name num N/A N/A problem N/A weightmap new_map N/A problem problems N/A N/A N/A desc problem N/A N/A N/A problem N/A desc I'm bad. N/A key N/A list N/A N/A problem keys N/A N/A N/A key migration_key N/A N/A N/A problem N/A N/A migration_key N/A key N/A problem N/A key N/A N/A key migration_overwrites N/A N/A N/A problem N/A key N/A migration_overwrites N/A key N/A N/A N/A key migration_key N/A key deletion_key N/A N/A N/A N/A problem pop key None N/A output N/A N/A N/A json_util dumps problem N/A N/A N/A output_file write output N/A build_autogen N/A N/A args N/A N/A N/A instances N/A args instance_count N/A problems N/A N/A N/A api problem get_all_problems show_disabled True N/A problem problems N/A N/A N/A N/A problem get autogen False N/A N/A N/A N/A N/A api autogen build_problem_instances N/A problem N/A pid instances N/A list_problems N/A N/A args N/A N/A N/A problems N/A N/A N/A api problem get_all_problems show_disabled True N/A problem problems N/A N/A N/A N/A {} ({}) - {} points format N/A problem N/A name N/A N/A problem N/A disabled disabled enabled N/A problem N/A score N/A clear_collections N/A N/A args N/A N/A N/A db N/A N/A N/A api common get_conn N/A collection N/A args collections N/A N/A N/A N/A N/A db N/A collection remove N/A get_output_file N/A N/A output N/A N/A N/A N/A output N/A sys stdout N/A N/A output N/A N/A N/A N/A N/A open output w N/A N/A N/A IOError N/A error N/A N/A N/A N/A logging warning error N/A N/A exit 1 N/A add_new_problems N/A N/A args N/A N/A N/A N/A check_files_exist N/A args files N/A N/A N/A insert_objects N/A N/A api problem insert_problem N/A args files N/A errors N/A N/A N/A api problem analyze_problems N/A error errors N/A N/A N/A N/A logging warning error N/A add_new_achievements N/A N/A args N/A N/A N/A N/A check_files_exist N/A args files N/A N/A N/A insert_objects N/A N/A api achievement insert_achievement N/A args files N/A load_problems N/A N/A args N/A N/A N/A problem_dir N/A N/A args problems_directory N/A 0 N/A grader_dir N/A N/A args graders_directory N/A 0 N/A static_dir N/A N/A args static_directory N/A 0 N/A N/A N/A N/A path exists static_dir N/A N/A N/A N/A logging debug N/A N/A No directory {}. Creating... format static_dir N/A N/A makedirs static_dir N/A N/A N/A N/A path exists problem_dir N/A N/A N/A N/A logging critical N/A N/A No such directory: {} format problem_dir N/A N/A N/A dirpath dirnames filenames N/A walk problem_dir N/A N/A N/A problem.json filenames N/A N/A json_file N/A N/A path join dirpath problem.json N/A contents N/A N/A N/A open json_file r read N/A N/A N/A data N/A N/A json_util loads contents N/A N/A N/A ValueError N/A e N/A N/A N/A N/A logging warning N/A N/A Invalid JSON format in file {filename} ({exception}) format filename json_file exception e N/A N/A N/A N/A isinstance data dict N/A N/A N/A N/A logging warning N/A N/A Invalid JSON format in file {} format json_file N/A N/A N/A name data N/A N/A N/A N/A logging warning N/A N/A Invalid problem format in file {} format json_file N/A N/A problem_name N/A data N/A name N/A relative_path N/A N/A path relpath dirpath problem_dir N/A N/A N/A logging info N/A N/A Found problem '{}' format problem_name N/A N/A grader dirnames N/A N/A N/A N/A logging warning N/A N/A Problem '{}' appears to have no grader folder. Skipping... format problem_name N/A N/A grader_path N/A N/A path join grader_dir relative_path N/A N/A N/A path exists grader_path N/A N/A N/A N/A shutil rmtree grader_path N/A N/A N/A shutil copytree N/A N/A path join dirpath grader grader_path N/A N/A N/A logging info N/A N/A Graders updated for problem {} format problem_name N/A N/A N/A N/A N/A N/A api problem insert_problem data N/A N/A N/A N/A N/A api common WebException N/A e N/A N/A N/A N/A logging info N/A N/A Problem '{}' was not added to the database. Reason: {} format problem_name e N/A N/A static dirnames N/A N/A N/A N/A logging info N/A N/A Found a static directory for '{}'. Copying... format problem_name N/A static_path N/A N/A path join static_dir relative_path N/A N/A N/A path exists static_path N/A N/A N/A N/A shutil rmtree static_path N/A N/A N/A shutil copytree N/A N/A path join dirpath static static_path N/A errors N/A N/A N/A api problem analyze_problems N/A error errors N/A N/A N/A N/A logging warning error N/A main N/A N/A N/A N/A N/A parser N/A N/A argparse ArgumentParser description N/A N/A {} problem manager format N/A N/A api config competition_name N/A debug_level N/A N/A parser add_mutually_exclusive_group N/A N/A N/A debug_level add_argument -v --verbose help Print intermediate results action store_true N/A N/A N/A debug_level add_argument -s --silent help Print out very little action store_true N/A subparser N/A N/A parser add_subparsers help Select one of the following actions N/A parser_autogen N/A N/A subparser add_parser autogen help Deal with Problem Autogeneration N/A subparser_autogen N/A N/A parser_autogen add_subparsers help Select one of the following actions N/A parser_autogen_build N/A N/A subparser_autogen add_parser build help Build new autogen instances N/A N/A N/A parser_autogen_build add_argument instance_count type int help How many instances of each problem to build N/A N/A N/A parser_autogen_build set_defaults func build_autogen N/A parser_problems N/A N/A subparser add_parser problems help Deal with Problems N/A subparser_problems N/A N/A parser_problems add_subparsers help Select one of the following actions N/A parser_problems_import N/A N/A subparser_problems add_parser import help Import problems (from JSON) into the database N/A N/A N/A parser_problems_import add_argument files nargs + help Files containing problems to insert. N/A N/A N/A parser_problems_import set_defaults func add_new_problems N/A parser_problems_load N/A N/A subparser_problems add_parser load help Load problems that follow the special problem format N/A N/A N/A parser_problems_load add_argument problems_directory nargs 1 help Directory where problems are located N/A N/A N/A parser_problems_load add_argument graders_directory nargs 1 help Directory where graders are stored N/A N/A N/A parser_problems_load add_argument static_directory nargs 1 help Directory where static problem content is stored N/A N/A N/A parser_problems_load set_defaults func load_problems N/A parser_problems_list N/A N/A subparser_problems add_parser list help List problems in the database N/A N/A N/A parser_problems_list set_defaults func list_problems N/A parser_problems_migrate N/A N/A subparser_problems add_parser migrate help Migrate 2013 problems to the new format N/A N/A N/A parser_problems_migrate add_argument -o --output action store help Output file. default N/A sys stdout N/A N/A N/A parser_problems_migrate set_defaults func migrate_problems N/A parser_achievements N/A N/A subparser add_parser achievements help Deal with Achievements N/A subparser_achievements N/A N/A parser_achievements add_subparsers help Select one of the following actions N/A parser_achievements_load N/A N/A subparser_achievements add_parser load help Load new achievements into the database N/A N/A N/A parser_achievements_load add_argument files nargs + help Files containing achievements to insert. N/A N/A N/A parser_achievements_load set_defaults func add_new_achievements N/A parser_database N/A N/A subparser add_parser database help Deal with database N/A subparser_database N/A N/A parser_database add_subparsers help Select one of the following actions N/A parser_database_clear N/A N/A subparser_database add_parser clear help Clear collections N/A N/A N/A parser_database_clear add_argument collections nargs + help Collections to clear N/A N/A N/A parser_database_clear set_defaults func clear_collections N/A args N/A N/A parser parse_args N/A N/A args silent N/A N/A N/A N/A logging basicConfig level N/A logging CRITICAL stream N/A sys stdout N/A N/A N/A args verbose N/A N/A N/A N/A logging basicConfig level N/A logging DEBUG stream N/A sys stdout N/A N/A N/A N/A logging basicConfig level N/A logging WARNING stream N/A sys stdout N/A N/A func args N/A N/A N/A N/A args func args N/A N/A N/A N/A parser print_help N/A N/A N/A main