From c0d00c600f9d3e1abc8e2be9e88842a079510d62 Mon Sep 17 00:00:00 2001 From: rngsurrounded Date: Tue, 4 Mar 2025 07:50:28 +0900 Subject: [PATCH 1/3] update code solution info --- .../components/CodeSolution/index.tsx | 116 ++++++++++++++++-- 1 file changed, 105 insertions(+), 11 deletions(-) diff --git a/services/frontend/src/pages/CompetitionSession/modules/TaskSolution/components/CodeSolution/index.tsx b/services/frontend/src/pages/CompetitionSession/modules/TaskSolution/components/CodeSolution/index.tsx index 11cc8a7..0b386d2 100644 --- a/services/frontend/src/pages/CompetitionSession/modules/TaskSolution/components/CodeSolution/index.tsx +++ b/services/frontend/src/pages/CompetitionSession/modules/TaskSolution/components/CodeSolution/index.tsx @@ -1,6 +1,13 @@ import React, { useRef, useEffect, useState } from 'react'; import * as monaco from 'monaco-editor'; -import { Copy, Check } from 'lucide-react'; +import { Copy, Check, Info } from 'lucide-react'; +import { + Dialog, + DialogContent, + DialogHeader, + DialogTitle, + DialogTrigger, +} from "@/components/ui/dialog"; interface CodeSolutionProps { answer: string; @@ -92,16 +99,103 @@ const CodeSolution: React.FC = ({
{languageDisplay}
- +
+ + + + + + + Информация о среде выполнения + + +
+
+

Ограничения

+
    +
  • +
    +
    +
    + Максимум 1 посылка в 10 секунд +
  • +
  • +
    +
    +
    + Максимальный размер решения 4MB +
  • +
  • +
    +
    +
    + Максимальное время работы программы 1 минута +
  • +
  • +
    +
    +
    + Выделяется 512MB на решение +
  • +
+
+ +
+

Доступные библиотеки

+
+
+
+ pandas + 2.2.3 +
+
+ numpy + 2.2.3 +
+
+ matplotlib + 3.10.1 +
+
+ scipy + 1.15.2 +
+
+ scikit-learn + 1.6.1 +
+
+ seaborn + 0.13.2 +
+
+ statsmodels + 0.14.4 +
+
+
+
+
+
+
+ + +
From e400e4636063b250369c84ff3a45aace57aeaf0e Mon Sep 17 00:00:00 2001 From: ITQ Date: Tue, 4 Mar 2025 02:04:11 +0300 Subject: [PATCH 2/3] (scope): [body] [footer(s)] --- ...alter_competitiontaskattachment_bind_at.py | 19 +++++++++++++++++++ services/backend/scripts/initdb | 2 +- 2 files changed, 20 insertions(+), 1 deletion(-) create mode 100644 services/backend/apps/task/migrations/0004_alter_competitiontaskattachment_bind_at.py diff --git a/services/backend/apps/task/migrations/0004_alter_competitiontaskattachment_bind_at.py b/services/backend/apps/task/migrations/0004_alter_competitiontaskattachment_bind_at.py new file mode 100644 index 0000000..70dea88 --- /dev/null +++ b/services/backend/apps/task/migrations/0004_alter_competitiontaskattachment_bind_at.py @@ -0,0 +1,19 @@ +# Generated by Django 5.1.6 on 2025-03-03 23:02 + +import django.core.validators +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('task', '0003_alter_competitiontaskattachment_task'), + ] + + operations = [ + migrations.AlterField( + model_name='competitiontaskattachment', + name='bind_at', + field=models.CharField(max_length=255, validators=[django.core.validators.RegexValidator('^(?:[a-zA-Z]:\\\\(?:[^<>:\\"\\/\\\\|?*]*\\\\)*|/(?:[^<>:\\"\\/\\\\|?*]+/?)*)$', message='Введите абсолютный путь до папки')], verbose_name='путь сохранения'), + ), + ] diff --git a/services/backend/scripts/initdb b/services/backend/scripts/initdb index 146732a..7714b7c 100755 --- a/services/backend/scripts/initdb +++ b/services/backend/scripts/initdb @@ -10,4 +10,4 @@ if [ "$DJANGO_CREATE_SUPERUSER" = "True" ]; then python manage.py createsuperuser --noinput --username "$DJANGO_SUPERUSER_USERNAME" --email "$DJANGO_SUPERUSER_EMAIL" || true fi -python manage.py init_achievments \ No newline at end of file +python manage.py init_achievments From 2c6c0d2dc050a212bf0ee845e8cad2bcd402f825 Mon Sep 17 00:00:00 2001 From: ITQ Date: Tue, 4 Mar 2025 02:09:04 +0300 Subject: [PATCH 3/3] (scope): [body] [footer(s)] --- services/backend/apps/task/tasks.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/services/backend/apps/task/tasks.py b/services/backend/apps/task/tasks.py index 98d3842..522bf3a 100644 --- a/services/backend/apps/task/tasks.py +++ b/services/backend/apps/task/tasks.py @@ -35,7 +35,7 @@ def analyze_data_task(self, submission_id): "code": base64.b64encode(code).decode("utf-8"), "answer_file_path": submission.task.answer_file_path, "expected_hash": hashlib.sha256( - submission.task.correct_answer_file.read().decode("utf-8") + submission.task.correct_answer_file.read() ).hexdigest(), }, timeout=30,