<commit_before>from django.db import models
from django.contrib.auth.models import User, Group

class Facility(models.Model):
    """
    Represents a facility that produces data
    """
    name=models.CharField(max_length=100)
    manager_group=models.ForeignKey(Group)
    class Meta:
        app_label = 'tardis_portal'
        verbose_name_plural="Facilities"
    def __unicode__(self):
        return self.name


def is_facility_manager(user):
     """
     Returns true if the user manages one or more facilities
     """
     return bool(facilitiesManagedBy(user).count())

def facilities_managed_by(user):
    """
    Returns a list of facilities managed by a user
    """
    return Facility.objects.filter(manager_group__user=user)
<commit_msg>camelcase to underscore typo fixed<commit_after>from django.db import models
from django.contrib.auth.models import User, Group

class Facility(models.Model):
    """
    Represents a facility that produces data
    """
    name=models.CharField(max_length=100)
    manager_group=models.ForeignKey(Group)
    class Meta:
        app_label = 'tardis_portal'
        verbose_name_plural="Facilities"
    def __unicode__(self):
        return self.name


def is_facility_manager(user):
     """
     Returns true if the user manages one or more facilities
     """
     return bool(facilities_managed_by(user).count())

def facilities_managed_by(user):
    """
    Returns a list of facilities managed by a user
    """
    return Facility.objects.filter(manager_group__user=user)

{'fraction_non_alphanumeric': 0.08871493803000652, 'fraction_numerical': 0.003913894324853229, 'mean_word_length': 3.5791044776119403, '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': '809412', 'n_tokens_mistral': 453, 'n_tokens_neox': 438, 'n_words': 114}