<commit_before>from django.db import models

class Tag(models.Model):
    name = models.CharField(max_length=16)

    @staticmethod
    def get_or_create(name):
        tag = Tag.objects.filter(name=name)
        if tag:
            return tag.first()
        else:
            tag = Tag(name=name)
            tag.save()
            return tag

    def __str__(self):
        return self.name


class Sumari(models.Model):
    tags = models.ManyToManyField(Tag)
    name = models.CharField(max_length=32)
    message = models.CharField(max_length=140)
    lat = models.DecimalField(max_digits=9, decimal_places=6)
    lng = models.DecimalField(max_digits=9, decimal_places=6)
    good = models.IntegerField(default=0)


    def to_json(self):
        obj = {
            "id": self.id,
            "name": self.name,
            "position": {<commit_msg>Update model<commit_after>from django.db import models

class Tag(models.Model):
    name = models.CharField(max_length=16)

    @staticmethod
    def get_or_create(name):
        tag = Tag.objects.filter(name=name)
        if tag:
            return tag.first()
        else:
            tag = Tag(name=name)
            tag.save()
            return tag

    def __str__(self):
        return self.name


class Sumari(models.Model):
    tags = models.ManyToManyField(Tag)
    name = models.CharField(max_length=32)
    message = models.CharField(max_length=140)
    lat = models.DecimalField(max_digits=9, decimal_places=8)
    lng = models.DecimalField(max_digits=9, decimal_places=8)
    good = models.IntegerField(default=0)


    def to_json(self):
        obj = {
            "id": self.id,
            "name": self.name,
            "position": {
{'fraction_non_alphanumeric': 0.11117612638970158, 'fraction_numerical': 0.014043300175541252, 'mean_word_length': 2.3529411764705883, 'pattern_counts': {'":': 6, '<': 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': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5270814', 'n_tokens_mistral': 558, 'n_tokens_neox': 535, 'n_words': 103}