<commit_before>import datetime
from django.db import models
from django.db.models import Q
from django.contrib.auth.models import User
from django.utils.safestring import SafeString


class Tag(models.Model):
    label = models.CharField(max_length=32)
    color = models.CharField(max_length=6)

    def __unicode__(self):
        return self.label


class Project(models.Model):
    STATUS_CHOICES = (
        ('AC', 'Active'),
        ('IN', 'Inactive'),
        ('FZ', 'Frozen'),
        ('CP', 'Completed'),
    )

    SCM_CHOICES = (
        ('GH', 'GitHub'),
        ('BB', 'BitBucket'),
    )

    name = models.CharField(max_length=50)
    slug = models.SlugField(max_length=50, unique=True)
    status = models.CharField(max_length="64", default='AC', choices=STATUS_CHOICES)
    scm_owner = models.CharField(max_length=64, null=True, blank=True)
    scm_repo = models.CharField(max_length=64, null=True, blank=True)
    scm_type = models.CharField(max_length="64", default='GH', choices=SCM_CHOICES)

    def __unicode__(self):
        return self.name

    def as_a(self):
        return SafeString('<a href="%s">%s</a>' % (self.get_absolute_url(), self.__unicode__()))

    def open_issues(self):
        return Issue.objects.filter(project=self).exclude(status='DL').exclude(status='NR').exclude(status='CP')

    def get_tags(self):
        # we should filter by project...
        return Tag.objects.all()  # filter(project=self)
<commit_msg>Forgot to add models.py to previous commit<commit_after>import datetime
from django.db import models
from django.db.models import Q
from django.contrib.auth.models import User
from django.utils.safestring import SafeString


class Tag(models.Model):
    label = models.CharField(max_length=32)
    color = models.CharField(max_length=6)

    def __unicode__(self):
        return self.label


class Project(models.Model):
    STATUS_CHOICES = (
        ('AC', 'Active'),
        ('IN', 'Inactive'),
        ('FZ', 'Frozen'),
        ('CP', 'Completed'),
    )

    SCM_CHOICES = (
        ('GH', 'GitHub'),
        ('BB', 'BitBucket'),
    )

    name = models.CharField(max_length=50)
    slug = models.SlugField(max_length=50, unique=True)
    status = models.CharField(max_length="64", default='AC', choices=STATUS_CHOICES)
    scm_owner = models.CharField(max_length=64, null=True, blank=True)
    scm_repo = models.CharField(max_length=64, null=True, blank=True)
    scm_type = models.CharField(max_length="64", default='GH', choices=SCM_CHOICES)
    priority = models.IntegerField(default=-1, blank=False, null=False)

    def __unicode__(self):
        return self.name

    def as_a(self):
        return SafeString('<a href="%s">%s</a>' % (self.get_absolute_url(), self.__unicode__()))

    def open_issues(self):
        return Issue.objects.filter(project=self).exclude(status='DL').exclude(status='NR').exclude(status='CP')

    def get_tags(self):
        # we should filter by project...
        return Tag.objects.all()  # filter(project=self)

{'fraction_non_alphanumeric': 0.14617169373549885, 'fraction_numerical': 0.010275107722903546, 'mean_word_length': 3.6359447004608296, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, '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': '299959', 'n_tokens_mistral': 1020, 'n_tokens_neox': 958, 'n_words': 190}