<commit_before># Generated by Django 2.2.16 on 2021-05-11 15:00

from django.db import migrations


MASSACHUSETTS = 'Massachusetts'
CALIFONIA = 'California'
NEW_YORK = 'New York'
RHODE_ISLAND = 'Rhode Island'
CALIFONIA_DATA_LIST = [
    'MASSACHUSETTS (MA)', 'Massachussetts ', 'MA', 'Ma.'
]


def update_accelerator_startup_data(apps, schema_editor):
    StartUp = apps.get_model('accelerator', 'Startup')
    StartUp.objects.filter(location_regional__in=CALIFONIA_DATA_LIST).update(
        location_regional=MASSACHUSETTS)

    StartUp.objects.filter(location_regional='CA').update(
        location_regional=CALIFONIA)
    StartUp.objects.filter(location_regional='NY').update(
        location_regional=NEW_YORK)
    StartUp.objects.filter(location_regional='RI').update(
        location_regional=RHODE_ISLAND)


class Migration(migrations.Migration):

    dependencies = [
        ('accelerator', '0040_create_core_profile_table'),
    ]

    operations = [
        migrations.RunPython(update_accelerator_startup_data,
                             migrations.RunPython.noop)
    ]<commit_msg>use python migration<commit_after># Generated by Django 2.2.16 on 2021-05-11 15:00

from django.db import migrations


MASSACHUSETTS = 'Massachusetts'
CALIFORNIA = 'California'
NEW_YORK = 'New York'
RHODE_ISLAND = 'Rhode Island'
MASSACHUSETTS_DATA_LIST = [
    'MASSACHUSETTS (MA)', 'Massachussetts ', 'MA', 'Ma.'
]


def update_accelerator_startup_data(apps, schema_editor):
    StartUp = apps.get_model('accelerator', 'Startup')
    StartUp.objects.filter(location_regional__in=MASSACHUSETTS_DATA_LIST).update(
        location_regional=MASSACHUSETTS)

    StartUp.objects.filter(location_regional='CA').update(
        location_regional=CALIFONIA)
    StartUp.objects.filter(location_regional='NY').update(
        location_regional=NEW_YORK)
    StartUp.objects.filter(location_regional='RI').update(
        location_regional=RHODE_ISLAND)


class Migration(migrations.Migration):

    dependencies = [
        ('accelerator', '0040_create_core_profile_table'),
    ]

    operations = [
        migrations.RunPython(update_accelerator_startup_data,
                             migrations.RunPython.noop)
    ]
{'fraction_non_alphanumeric': 0.10649819494584838, 'fraction_numerical': 0.018050541516245487, 'mean_word_length': 4.143851508120649, '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': '2369970', 'n_tokens_mistral': 798, 'n_tokens_neox': 739, 'n_words': 102}