<commit_before># coding=UTF-8

import datetime

from django.db import models
from django.contrib.auth.models import User
from django.utils.translation import ugettext_lazy as _
from django.db.models.signals import post_save

from countries.models import Country
from sorl.thumbnail.fields import ThumbnailField

import signals

def to_age(dateofbirth, reference_date=None):
    if reference_date is None:
        reference_date = datetime.date.today()

    if dateofbirth is None:
        return None

    bday = dateofbirth
    d = reference_date
    return (d.year - bday.year) - int((d.month, d.day) < (bday.month, bday.day))

class UserWebsite(models.Model):
    user = models.ForeignKey(User, verbose_name=_(u'user'), db_column='user_id')

    name = models.CharField(max_length=32)
    url = models.URLField()

class UserCommunication(models.Model):
    METHOD_CHOICES = (('skype', 'skype'),
                      ('msn', 'MSN'),
                      ('jabber', 'Jabber'),)

    user = models.ForeignKey(User, verbose_name=_(u'user'), db_column='user_id')

    method = models.CharField(max_length=12, choices=METHOD_CHOICES)
    identification = models.CharField(max_length=255)

    class Meta:
        unique_together = ('method', 'user')

class UserProfile(models.Model):
    SEX = (('', _('Unspecified')), ('male', _('male')), ('female', _('female')))

    user = models.ForeignKey(User, unique=True, verbose_name=_(u'user'), db_column='user_id', primary_key=True)

    dateofbirth = models.DateField(_(u'date of birth'), blank=True, null=True)
<commit_msg>Remove unspecified option for sex<commit_after># coding=UTF-8

import datetime

from django.db import models
from django.contrib.auth.models import User
from django.utils.translation import ugettext_lazy as _
from django.db.models.signals import post_save

from countries.models import Country
from sorl.thumbnail.fields import ThumbnailField

import signals

def to_age(dateofbirth, reference_date=None):
    if reference_date is None:
        reference_date = datetime.date.today()

    if dateofbirth is None:
        return None

    bday = dateofbirth
    d = reference_date
    return (d.year - bday.year) - int((d.month, d.day) < (bday.month, bday.day))

class UserWebsite(models.Model):
    user = models.ForeignKey(User, verbose_name=_(u'user'), db_column='user_id')

    name = models.CharField(max_length=32)
    url = models.URLField()

class UserCommunication(models.Model):
    METHOD_CHOICES = (('skype', 'skype'),
                      ('msn', 'MSN'),
                      ('jabber', 'Jabber'),)

    user = models.ForeignKey(User, verbose_name=_(u'user'), db_column='user_id')

    method = models.CharField(max_length=12, choices=METHOD_CHOICES)
    identification = models.CharField(max_length=255)

    class Meta:
        unique_together = ('method', 'user')

class UserProfile(models.Model):
    SEX = (('male', _('male')), ('female', _('female')))

    user = models.ForeignKey(User, unique=True, verbose_name=_(u'user'), db_column='user_id', primary_key=True)

    dateofbirth = models.DateField(_(u'date of birth'), blank=True, null=True)

{'fraction_non_alphanumeric': 0.13082322910019145, 'fraction_numerical': 0.005105296745373325, 'mean_word_length': 4.016, 'pattern_counts': {'":': 0, '<': 5, '<?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': '2254385', 'n_tokens_mistral': 1054, 'n_tokens_neox': 984, 'n_words': 223}