<commit_before>from django.db import models

# Create your models here.<commit_msg>First pass definitions for Activity, Datapoint<commit_after>from django.db import models
from django.contrib.auth.models import User

# Create your models here.


class Activity(models.Model):
    user = models.ForeignKey(User)
    full_description = models.CharField(max_length=255)
    units = models.CharField(max_length=40)

    def __str__(self):
        return self.full_description


class Datapoint(models.Model):
    user = models.ForeignKey(User)
    activity = models.ForeignKey('Activity')
    reps = models.PositiveIntegerField()
    timestamp = models.DateTimeField(auto_now_add=True)

    def __str__(self):
        return '{} {} at {}'.format(self.reps,
                                    self.activity.units,
                                    self.timestamp)
{'fraction_non_alphanumeric': 0.09407665505226481, 'fraction_numerical': 0.005807200929152149, 'mean_word_length': 2.9541284403669725, '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': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6115499', 'n_tokens_mistral': 242, 'n_tokens_neox': 231, 'n_words': 53}