<commit_before>from django.db.models.signals import post_save
from django.dispatch import receiver

from django.contrib.auth.models import User

from .models import Profile

# Add signal to automatically extend user profile
@receiver(post_save, sender=User)
def create_user_profile(sender, instance, created, **kwargs):
    if created:
        Profile.objects.create(user=instance)<commit_msg>Adding group profiles.<commit_after>from django.db.models.signals import post_save
from django.dispatch import receiver

from django.contrib.auth.models import User, Group

from .models import Profile, GroupProfile


# Add signal to automatically extend user profile
@receiver(post_save, sender=User)
def create_user_profile(sender, instance, created, **kwargs):
    if created:
        Profile.objects.create(user=instance)


# Add signal to automatically extend group profile
@receiver(post_save, sender=Group)
def create_user_profile(sender, instance, created, **kwargs):
    if created:
        GroupProfile.objects.create(group=instance)
{'fraction_non_alphanumeric': 0.0821256038647343, 'fraction_numerical': 0.0, 'mean_word_length': 5.598726114649682, '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': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2435365', 'n_tokens_mistral': 277, 'n_tokens_neox': 272, 'n_words': 86}