<commit_before>from django.db import models

class MessageData(models.Model):

    msg_id = models.CharField(primary_key=True, max_length=100)
    sender = models.CharField(max_length=100)
    sent_on = models.DateTimeField(auto_now=False, auto_now_add=False)
    subject = models.CharField(max_length=1000)
    text = models.TextField()
    ordinal = models.SmallIntegerField()

    def get_absolute_url(self):
        """Return the message URL from the CCL website"""
        baseurl = 'http://www.ccl.net/cgi-bin/ccl/message-new?'
        return baseurl + '{}+{:02}+{:02}+{:03}'.format(
            self.sent_on.year,
            self.sent_on.month,
            self.sent_on.day,
            self.ordinal
        )

    def __unicode__(self):
        return self.msg_id<commit_msg>avoid zero-length fields in string formatting<commit_after>from django.db import models

class MessageData(models.Model):

    msg_id = models.CharField(primary_key=True, max_length=100)
    sender = models.CharField(max_length=100)
    sent_on = models.DateTimeField(auto_now=False, auto_now_add=False)
    subject = models.CharField(max_length=1000)
    text = models.TextField()
    ordinal = models.SmallIntegerField()

    def get_absolute_url(self):
        """Return the message URL from the CCL website"""
        baseurl = 'http://www.ccl.net/cgi-bin/ccl/message-new?'
        return baseurl + '{0}+{1:02}+{2:02}+{3:03}'.format(
            self.sent_on.year,
            self.sent_on.month,
            self.sent_on.day,
            self.ordinal
        )

    def __unicode__(self):
        return self.msg_id
{'fraction_non_alphanumeric': 0.121571072319202, 'fraction_numerical': 0.022443890274314215, 'mean_word_length': 2.924205378973105, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, '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': '3900981', 'n_tokens_mistral': 543, 'n_tokens_neox': 507, 'n_words': 90}