<commit_before>from datetime import datetime
from django.db import models
from django.contrib.auth.models import User


BUILD_STATUS_CHOICES = (
    ('f', 'Fail',),
    ('s', 'Success',),
    ('q', 'Queued',),
    ('a', 'Aborted',),
    ('b', 'Building',),
)


class Project(models.Model):
    name = models.CharField(max_length=255)
    created = models.DateTimeField(default=datetime.utcnow)
    created_by = models.ForeignKey(User)
    repository = models.CharField(max_length=255)
    build_command = models.TextField()
    dockerfile = models.TextField(default='Dockerfile')
    private = models.BooleanField(default=False)

    def __unicode__(self):
        return self.name


class Pusher(models.Model):
    email = models.EmailField()
    name = models.CharField(max_length=255)

    def __unicode__(self):
        return self.name


class Build(models.Model):
    project = models.ForeignKey(Project)
    pusher = models.ForeignKey(Pusher)
    created = models.DateTimeField(default=datetime.utcnow)
    commit_sha = models.CharField(max_length=40)
    commit_timestamp = models.DateTimeField()
    status = models.CharField(max_length=1, choices=BUILD_STATUS_CHOICES,
                              default='q')

    def __unicode__(self):
        return self.git_sha

    @property
    def is_success(self):
        return self.status == 's'<commit_msg>Fix build unicode<commit_after>from datetime import datetime
from django.db import models
from django.contrib.auth.models import User


BUILD_STATUS_CHOICES = (
    ('f', 'Fail',),
    ('s', 'Success',),
    ('q', 'Queued',),
    ('a', 'Aborted',),
    ('b', 'Building',),
)


class Project(models.Model):
    name = models.CharField(max_length=255)
    created = models.DateTimeField(default=datetime.utcnow)
    created_by = models.ForeignKey(User)
    repository = models.CharField(max_length=255)
    build_command = models.TextField()
    dockerfile = models.TextField(default='Dockerfile')
    private = models.BooleanField(default=False)

    def __unicode__(self):
        return self.name


class Pusher(models.Model):
    email = models.EmailField()
    name = models.CharField(max_length=255)

    def __unicode__(self):
        return self.name


class Build(models.Model):
    project = models.ForeignKey(Project)
    pusher = models.ForeignKey(Pusher)
    created = models.DateTimeField(default=datetime.utcnow)
    commit_sha = models.CharField(max_length=40)
    commit_timestamp = models.DateTimeField()
    status = models.CharField(max_length=1, choices=BUILD_STATUS_CHOICES,
                              default='q')

    def __unicode__(self):
        return self.commit_sha

    @property
    def is_success(self):
        return self.status == 's'
{'fraction_non_alphanumeric': 0.12212065813528336, 'fraction_numerical': 0.008775137111517367, 'mean_word_length': 3.552412645590682, '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': '5673480', 'n_tokens_mistral': 860, 'n_tokens_neox': 820, 'n_words': 159}