<commit_before>from datetime import datetime

from django.conf import settings
from django.db import models

import amo
from translations.fields import TranslatedField, translations_with_fallback


class Addon(amo.ModelBase):
    STATUS_CHOICES = (
            (0, 'Null'),
            (1, 'In the sandbox'),
            (2, 'Pending approval'),
            (3, 'Nominated to be public'),
            (4, 'Public'),
            (5, 'Disabled'),
            (6, 'Listed'),
            (7, 'Beta'),
            )

    CONTRIBUTIONS_CHOICES = (
            (0, 'None'),
            (1, 'Passive; user shown message next to download button'),
            (2, 'User shown splash screen after download'),
            (3, 'Roadblock; User shown splash screen before download'),
    )

    guid = models.CharField(max_length=255, unique=True)
    name = TranslatedField()
    defaultlocale = models.CharField(max_length=10,
                                     default=settings.LANGUAGE_CODE)

    addontype = models.ForeignKey('AddonType')
    status = models.PositiveIntegerField(choices=STATUS_CHOICES, db_index=True)
    higheststatus = models.PositiveIntegerField(choices=STATUS_CHOICES,
                    help_text="An upper limit for what an author can change.")
    icontype = models.CharField(max_length=25, blank=True)
    homepage = TranslatedField()
    supportemail = TranslatedField()
    supporturl = TranslatedField()
    description = TranslatedField()
    summary = TranslatedField()
    developercomments = TranslatedField()
    eula = TranslatedField()
    privacypolicy = TranslatedField()
    the_reason = TranslatedField()
    the_future = TranslatedField()

    averagerating = models.CharField(max_length=255, default=0)
    bayesianrating = models.FloatField(default=0, db_index=True)
    totalreviews = models.PositiveIntegerField(default=0)
    weeklydownloads = models.PositiveIntegerField(default=0)
    totaldownloads = models.PositiveIntegerField(default=0)
    average_daily_downloads = models.PositiveIntegerField(default=0)
    average_daily_users = models.PositiveIntegerField(default=0)
    sharecount = models.PositiveIntegerField(default=0, db_index=True)

    inactive = models.BooleanField(default=False, db_index=True)
    trusted = models.BooleanField(default=False)
    viewsource = models.BooleanField(default=False)
    publicstats = models.BooleanField(default=False)
    prerelease = models.BooleanField(default=False)
    adminreview = models.BooleanField(default=False)
    sitespecific = models.BooleanField(default=False)
    externalsoftware = models.BooleanField(default=False)
    binary = models.BooleanField(default=False,
                            help_text="Does the add-on contain a binary?")
    dev_agreement = models.BooleanField(default=False,
                            help_text="Has the dev agreement been signed?")
    wants_contributions = models.BooleanField(default=False)
    show_beta = models.BooleanField(default=True)

    nominationdate = models.DateTimeField(null=True)
    target_locale = models.CharField(max_length=255, db_index=True, blank=True,
                            help_text="For dictionaries and language packs")
    locale_disambiguation = models.CharField(max_length=255, blank=True,
                            help_text="For dictionaries and language packs")

    paypal_id = models.CharField(max_length=255, blank=True)
    suggested_amount = models.CharField(max_length=255, blank=True,
                            help_text="Requested donation amount.")
    annoying = models.PositiveIntegerField(choices=STATUS_CHOICES, default=0)

    get_satisfaction_company = models.CharField(max_length=255, blank=True)
    get_satisfaction_product = models.CharField(max_length=255, blank=True)
<commit_msg>annoying should use contrib choices<commit_after>from datetime import datetime

from django.conf import settings
from django.db import models

import amo
from translations.fields import TranslatedField, translations_with_fallback


class Addon(amo.ModelBase):
    STATUS_CHOICES = (
            (0, 'Null'),
            (1, 'In the sandbox'),
            (2, 'Pending approval'),
            (3, 'Nominated to be public'),
            (4, 'Public'),
            (5, 'Disabled'),
            (6, 'Listed'),
            (7, 'Beta'),
            )

    CONTRIBUTIONS_CHOICES = (
            (0, 'None'),
            (1, 'Passive; user shown message next to download button'),
            (2, 'User shown splash screen after download'),
            (3, 'Roadblock; User shown splash screen before download'),
    )

    guid = models.CharField(max_length=255, unique=True)
    name = TranslatedField()
    defaultlocale = models.CharField(max_length=10,
                                     default=settings.LANGUAGE_CODE)

    addontype = models.ForeignKey('AddonType')
    status = models.PositiveIntegerField(choices=STATUS_CHOICES, db_index=True)
    higheststatus = models.PositiveIntegerField(choices=STATUS_CHOICES,
                    help_text="An upper limit for what an author can change.")
    icontype = models.CharField(max_length=25, blank=True)
    homepage = TranslatedField()
    supportemail = TranslatedField()
    supporturl = TranslatedField()
    description = TranslatedField()
    summary = TranslatedField()
    developercomments = TranslatedField()
    eula = TranslatedField()
    privacypolicy = TranslatedField()
    the_reason = TranslatedField()
    the_future = TranslatedField()

    averagerating = models.CharField(max_length=255, default=0)
    bayesianrating = models.FloatField(default=0, db_index=True)
    totalreviews = models.PositiveIntegerField(default=0)
    weeklydownloads = models.PositiveIntegerField(default=0)
    totaldownloads = models.PositiveIntegerField(default=0)
    average_daily_downloads = models.PositiveIntegerField(default=0)
    average_daily_users = models.PositiveIntegerField(default=0)
    sharecount = models.PositiveIntegerField(default=0, db_index=True)

    inactive = models.BooleanField(default=False, db_index=True)
    trusted = models.BooleanField(default=False)
    viewsource = models.BooleanField(default=False)
    publicstats = models.BooleanField(default=False)
    prerelease = models.BooleanField(default=False)
    adminreview = models.BooleanField(default=False)
    sitespecific = models.BooleanField(default=False)
    externalsoftware = models.BooleanField(default=False)
    binary = models.BooleanField(default=False,
                            help_text="Does the add-on contain a binary?")
    dev_agreement = models.BooleanField(default=False,
                            help_text="Has the dev agreement been signed?")
    wants_contributions = models.BooleanField(default=False)
    show_beta = models.BooleanField(default=True)

    nominationdate = models.DateTimeField(null=True)
    target_locale = models.CharField(max_length=255, db_index=True, blank=True,
                            help_text="For dictionaries and language packs")
    locale_disambiguation = models.CharField(max_length=255, blank=True,
                            help_text="For dictionaries and language packs")

    paypal_id = models.CharField(max_length=255, blank=True)
    suggested_amount = models.CharField(max_length=255, blank=True,
                            help_text="Requested donation amount.")
    annoying = models.PositiveIntegerField(choices=CONTRIBUTIONS_CHOICES,
                                           default=0)

    get_satisfaction_company = models.CharField(max_length=255, blank=True)
    get_satisfaction_product = models.CharField(max_length=255, blank=True)

{'fraction_non_alphanumeric': 0.09323583180987204, 'fraction_numerical': 0.012797074954296161, 'mean_word_length': 3.3271186440677964, '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': 16, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3178945', 'n_tokens_mistral': 2227, 'n_tokens_neox': 2073, 'n_words': 426}