oioioi.programs.utils

Module Contents

Functions

sum_score_aggregator(group_results)

sum_group_scorer(test_results)

Adds results of all tests inside a test group.

min_group_scorer(test_results)

Gets minimal result of all tests inside a test group.

discrete_test_scorer(test, result)

threshold_linear_test_scorer(test, result)

Full score if took less than half of limit and then decreasing to 1

decode_str(str)

get_submission_source_file_or_error(request, submission_id)

Returns the submission source and filename

has_report_actions_config(problem)

is_problem_with_library(problem)

is_model_submission(submission)

filter_model_submissions(queryset)

form_field_id_for_langs(problem_instance)

get_problem_link_or_name(request, submission)

get_extension(file_name)

get_submittable_languages()

oioioi.programs.utils.sum_score_aggregator(group_results)[source]
oioioi.programs.utils.sum_group_scorer(test_results)[source]

Adds results of all tests inside a test group.

exception oioioi.programs.utils.UnequalMaxScores[source]

Bases: ValueError

Inappropriate argument value (of correct type).

oioioi.programs.utils.min_group_scorer(test_results)[source]

Gets minimal result of all tests inside a test group.

oioioi.programs.utils.discrete_test_scorer(test, result)[source]
oioioi.programs.utils.threshold_linear_test_scorer(test, result)[source]

Full score if took less than half of limit and then decreasing to 1

oioioi.programs.utils.decode_str(str)[source]
oioioi.programs.utils.get_submission_source_file_or_error(request, submission_id)[source]

Returns the submission source and filename

If it does not exist or the user has no rights to see it, then error is raised.

oioioi.programs.utils.has_report_actions_config(problem)[source]
oioioi.programs.utils.is_problem_with_library(problem)[source]
oioioi.programs.utils.is_model_submission(submission)[source]
oioioi.programs.utils.filter_model_submissions(queryset)[source]
oioioi.programs.utils.form_field_id_for_langs(problem_instance)[source]
oioioi.programs.utils.get_extension(file_name)[source]
oioioi.programs.utils.get_submittable_languages()[source]