<commit_before># Author: <NAME>

from django.db import models
from django.conf import settings
import django.utils.timezone as timezone
from django.core.exceptions import ValidationError
import uuid


class Author(models.Model):
    user = models.OneToOneField(settings.AUTH_USER_MODEL,
                                on_delete=models.CASCADE)
    url = models.URLField()
    host = models.URLField()
    github = models.URLField(blank=True, default='')
    bio = models.TextField(blank=True, default='')

    # http://hostname/author/<uuid>
    id = models.URLField(primary_key=True)

    def __str__(self):
        return self.user.get_username()

class Follow(models.Model):
    author = models.ForeignKey(Author, on_delete=models.CASCADE,
                               related_name='follow')
    friend = models.URLField()

    requesterDisplayName = models.CharField(max_length=256, default="")

    def __str__(self):
        return '{} follows {}'.format(self.author, self.requesterDisplayName)

class FriendRequest(models.Model):
    requester = models.URLField()

    requestee = models.ForeignKey(Author, on_delete=models.CASCADE,
                                  related_name='request')
    requesterDisplayName = models.CharField(max_length=256, default="")

    created = models.DateTimeField(auto_now=True)

    def __str__(self):
        return '{} for {}'.format(self.requester, self.requesterDisplayName)

class Post(models.Model):
    class Meta:
        ordering = ['-published']
    title = models.CharField(max_length=32)
    description = models.CharField(max_length=140) # why not Twitter?
    contentType = models.CharField(max_length=32)
    content = models.TextField()
    author = models.ForeignKey(Author, on_delete=models.CASCADE,
                               related_name='post_author')
    published = models.DateTimeField(default=timezone.now)

    # http://hostname/posts/<uuid>
    id = models.URLField(primary_key=True)
    visibility = models.CharField(max_length=10, default="PUBLIC")<commit_msg>small change to return in model<commit_after># Author: <NAME>

from django.db import models
from django.conf import settings
import django.utils.timezone as timezone
from django.core.exceptions import ValidationError
import uuid


class Author(models.Model):
    user = models.OneToOneField(settings.AUTH_USER_MODEL,
                                on_delete=models.CASCADE)
    url = models.URLField()
    host = models.URLField()
    github = models.URLField(blank=True, default='')
    bio = models.TextField(blank=True, default='')

    # http://hostname/author/<uuid>
    id = models.URLField(primary_key=True)

    def __str__(self):
        return self.user.get_username()

class Follow(models.Model):
    author = models.ForeignKey(Author, on_delete=models.CASCADE,
                               related_name='follow')
    friend = models.URLField()

    requesterDisplayName = models.CharField(max_length=256, default="")

    def __str__(self):
        return '{} follows {}'.format(self.author, self.requesterDisplayName)

class FriendRequest(models.Model):
    requester = models.URLField()

    requestee = models.ForeignKey(Author, on_delete=models.CASCADE,
                                  related_name='request')
    requesterDisplayName = models.CharField(max_length=256, default="")

    created = models.DateTimeField(auto_now=True)

    def __str__(self):
        return '{} for {}'.format(self.requesterDisplayName, self.requestee)

class Post(models.Model):
    class Meta:
        ordering = ['-published']
    title = models.CharField(max_length=32)
    description = models.CharField(max_length=140) # why not Twitter?
    contentType = models.CharField(max_length=32)
    content = models.TextField()
    author = models.ForeignKey(Author, on_delete=models.CASCADE,
                               related_name='post_author')
    published = models.DateTimeField(default=timezone.now)

    # http://hostname/posts/<uuid>
    id = models.URLField(primary_key=True)
    visibility = models.CharField(max_length=10, default="PUBLIC")
{'fraction_non_alphanumeric': 0.11376953125, 'fraction_numerical': 0.00732421875, 'mean_word_length': 3.3308668076109935, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6908671', 'n_tokens_mistral': 1224, 'n_tokens_neox': 1175, 'n_words': 220}