<commit_before># -*- coding: utf-8 -*-
from __future__ import unicode_literals

from django.db import models, migrations
from collections import defaultdict


def add_contest_problem_order(apps, schema_editor):
    ContestProblem = apps.get_model('judge', 'ContestProblem')
    db_alias = schema_editor.connection.alias
    order = defaultdict(lambda: 0)
    for cp in ContestProblem.objects.using(db_alias):
        cp.order = order[cp.problem_id, cp.contest_id]
        cp.save()
        order[cp.problem_id, cp.contest_id] += 1


class Migration(migrations.Migration):

    dependencies = [
        ('judge', '0007_test_site_perm'),
    ]

    operations = [
        migrations.AddField(
            model_name='contestproblem',
            name='order',<commit_msg>I think I need more sleep. #124<commit_after># -*- coding: utf-8 -*-
from __future__ import unicode_literals

from django.db import models, migrations
from collections import defaultdict


def add_contest_problem_order(apps, schema_editor):
    ContestProblem = apps.get_model('judge', 'ContestProblem')
    db_alias = schema_editor.connection.alias
    order = defaultdict(lambda: 0)
    for cp in ContestProblem.objects.using(db_alias):
        cp.order = order[cp.contest_id]
        cp.save()
        order[cp.contest_id] += 1


class Migration(migrations.Migration):

    dependencies = [
        ('judge', '0007_test_site_perm'),
    ]

    operations = [
        migrations.AddField(
            model_name='contestproblem',
            name='order',
{'fraction_non_alphanumeric': 0.10747051114023591, 'fraction_numerical': 0.011140235910878113, 'mean_word_length': 3.289325842696629, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7049970', 'n_tokens_mistral': 489, 'n_tokens_neox': 456, 'n_words': 97}