<commit_before>from django.db import IntegrityError
from django.util.text import slugify

from standup.status.models import StandupUser


class Exhausted(Exception):
    pass


def unique_string_generator(base, max_count=50):
    """Generates strings using a base plus some count"""
    yield base

    count = 2
    while count < max_count:
        yield '%s%d' % (base, count)
        count += 1

    raise Exhausted('No more slots available for generation. Base was "%s"' % base)


def create_profile(user, is_new, **kwargs):
    """Creates a profile if the user is new<commit_msg>Fix typo<commit_after>from django.db import IntegrityError
from django.utils.text import slugify

from standup.status.models import StandupUser


class Exhausted(Exception):
    pass


def unique_string_generator(base, max_count=50):
    """Generates strings using a base plus some count"""
    yield base

    count = 2
    while count < max_count:
        yield '%s%d' % (base, count)
        count += 1

    raise Exhausted('No more slots available for generation. Base was "%s"' % base)


def create_profile(user, is_new, **kwargs):
    """Creates a profile if the user is new
{'fraction_non_alphanumeric': 0.09278350515463918, 'fraction_numerical': 0.006872852233676976, 'mean_word_length': 3.623015873015873, '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': '7212019', 'n_tokens_mistral': 359, 'n_tokens_neox': 338, 'n_words': 124}