<commit_before>from __future__ import unicode_literals

from django.db import models
from django.core.validators import RegexValidator
from django_markdown.models import MarkdownField
from django.conf import settings

class News(models.Model):
    CHOICE = [('C', 'Campus News'),
            ('N', 'In the News'),
            ('S', 'Spotlight'),
            ]
    title = models.CharField(max_length=300)
    details = models.CharField(max_length=2000)
    category = models.CharField(max_length=1, choices=CHOICE)
    timestamp = models.DateTimeField(auto_now_add=True)
    pinned = models.BooleanField(default=False)

    def __str__(self):
        return self.title

class Announcements(models.Model):
    title = models.CharField(max_length=300)
    details = models.CharField(max_length=2000)
    timestamp = models.DateTimeField(auto_now_add=True)
    pinned = models.BooleanField(default=False)

    def __str__(self):
        return self.title

class Club(models.Model):
    user = models.OneToOneField(settings.AUTH_USER_MODEL)
    name = models.CharField(max_length=300)
    convenor = models.CharField(max_length=100)
    strength = models.IntegerField()

    def __str__(self):
        return self.name

class Member(models.Model):
    user = models.OneToOneField(settings.AUTH_USER_MODEL)
    BRANCH_LIST = [('CH', 'Chemical Engineering'),
                   ('CO', 'Computer Engineering'),
                   ('CV', 'Civil Engineering'),
                   ('EC', 'Electronics and Communications Engineering'),
                   ('EE', 'Elelctrical and Electronics Engineering'),
                   ('IT', 'Information Technology'),
                   ('ME', 'Mechanical Engineering'),
                   ('MN', 'Mining Engineering'),
                   ('MT', 'Materials and Metallurgical Engineering'),
                   ]
    branch = models.CharField(max_length=2, choices=BRANCH_LIST)
    email = models.EmailField()
    address = models.CharField(max_length=1000)
    phone_regex = RegexValidator(regex=r'^\+?1?\d{9,15}$', message="Phone number must be entered in the format: '+999999999'. Up to 15 digits allowed.")
    phone_number = models.CharField(max_length=15, validators=[phone_regex], blank=True)

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


class Events(models.Model):
    title = models.CharField(max_length=200)
    organizer = models.ForeignKey(Club, editable=False)
    details = models.CharField(max_length=2000)
    start = models.DateTimeField()
    end = models.DateTimeField()
    phone_regex = RegexValidator(regex=r'^\+?1?\d{9,15}$', message="Phone number must be entered in the format: '+999999999'. Up to 15 digits allowed.")
    contact = models.CharField(max_length=15, validators=[phone_regex], blank=True)

    def __str__(self):
        return self.title

class Author(models.Model):
    name = models.CharField(max_length=50)
    prof_pic = models.ImageField(upload_to='author_profile_pics/%Y-%m-%d/',null=True,blank=True)
    blurb = MarkdownField()

    def __str__(self):
        return self.name

class Articles(models.Model):
    title = models.CharField(max_length=200)
    author = models.ForeignKey(Author)
    content = MarkdownField()
    published = models.DateTimeField(auto_now_add=True)

    def __str__(self):
        return self.title

class Complaint(models.Model):
    choice = [('H', 'HCC'),
            ('S', 'Security'),
            ('L', 'LAN'),
            ('P', 'Sports'),
            ('E', 'Eateries'),
            ('I', 'Independent Bodies'),
            ('A', 'Academics'),
            ('M', 'Miscellaneous'),
            ]
    complaint = models.CharField(max_length=300)
    details = models.CharField(max_length=2000)
    date = models.DateTimeField(auto_now_add=True)
    ctype = models.CharField(max_length=1, choices=choice)

    def __str__(self):
        return self.complaint<commit_msg>Picture for Articles<commit_after>from __future__ import unicode_literals

from django.db import models
from django.core.validators import RegexValidator
from django_markdown.models import MarkdownField
from django.conf import settings

class News(models.Model):
    CHOICE = [('C', 'Campus News'),
            ('N', 'In the News'),
            ('S', 'Spotlight'),
            ]
    title = models.CharField(max_length=300)
    details = models.CharField(max_length=2000)
    category = models.CharField(max_length=1, choices=CHOICE)
    timestamp = models.DateTimeField(auto_now_add=True)
    pinned = models.BooleanField(default=False)

    def __str__(self):
        return self.title

class Announcements(models.Model):
    title = models.CharField(max_length=300)
    details = models.CharField(max_length=2000)
    timestamp = models.DateTimeField(auto_now_add=True)
    pinned = models.BooleanField(default=False)

    def __str__(self):
        return self.title

class Club(models.Model):
    user = models.OneToOneField(settings.AUTH_USER_MODEL)
    name = models.CharField(max_length=300)
    convenor = models.CharField(max_length=100)
    strength = models.IntegerField()

    def __str__(self):
        return self.name

class Member(models.Model):
    user = models.OneToOneField(settings.AUTH_USER_MODEL)
    BRANCH_LIST = [('CH', 'Chemical Engineering'),
                   ('CO', 'Computer Engineering'),
                   ('CV', 'Civil Engineering'),
                   ('EC', 'Electronics and Communications Engineering'),
                   ('EE', 'Elelctrical and Electronics Engineering'),
                   ('IT', 'Information Technology'),
                   ('ME', 'Mechanical Engineering'),
                   ('MN', 'Mining Engineering'),
                   ('MT', 'Materials and Metallurgical Engineering'),
                   ]
    branch = models.CharField(max_length=2, choices=BRANCH_LIST)
    email = models.EmailField()
    address = models.CharField(max_length=1000)
    phone_regex = RegexValidator(regex=r'^\+?1?\d{9,15}$', message="Phone number must be entered in the format: '+999999999'. Up to 15 digits allowed.")
    phone_number = models.CharField(max_length=15, validators=[phone_regex], blank=True)

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


class Events(models.Model):
    title = models.CharField(max_length=200)
    organizer = models.ForeignKey(Club, editable=False)
    details = models.CharField(max_length=2000)
    start = models.DateTimeField()
    end = models.DateTimeField()
    phone_regex = RegexValidator(regex=r'^\+?1?\d{9,15}$', message="Phone number must be entered in the format: '+999999999'. Up to 15 digits allowed.")
    contact = models.CharField(max_length=15, validators=[phone_regex], blank=True)

    def __str__(self):
        return self.title

class Author(models.Model):
    name = models.CharField(max_length=50)
    prof_pic = models.ImageField(upload_to='author_profile_pics/%Y-%m-%d/',null=True,blank=True)
    blurb = MarkdownField()

    def __str__(self):
        return self.name

class Articles(models.Model):
    title = models.CharField(max_length=200)
    author = models.ForeignKey(Author)
    article_pic = models.ImageField(upload_to='article_pics/%Y-%m-%d/',null=True,blank=True)
    content = MarkdownField()
    published = models.DateTimeField(auto_now_add=True)

    def __str__(self):
        return self.title

class Complaint(models.Model):
    choice = [('H', 'HCC'),
            ('S', 'Security'),
            ('L', 'LAN'),
            ('P', 'Sports'),
            ('E', 'Eateries'),
            ('I', 'Independent Bodies'),
            ('A', 'Academics'),
            ('M', 'Miscellaneous'),
            ]
    complaint = models.CharField(max_length=300)
    details = models.CharField(max_length=2000)
    date = models.DateTimeField(auto_now_add=True)
    ctype = models.CharField(max_length=1, choices=choice)

    def __str__(self):
        return self.complaint
{'fraction_non_alphanumeric': 0.12702839756592293, 'fraction_numerical': 0.02028397565922921, 'mean_word_length': 3.2164617851416355, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 4, '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': '1511476', 'n_tokens_mistral': 2504, 'n_tokens_neox': 2303, 'n_words': 483}