<commit_before>"""
Base information for pysal meta package
"""


federation_hierarchy = {
    'explore': ['esda', 'giddy', 'segregation',
                'pointpats', 'inequality',
                 'spaghetti', 'access', 'momepy'],
    'model': ['spreg', 'spglm', 'tobler', 'spint',
              'mgwr', 'spvcm', 'access', 'spopt'],
    'viz': ['splot', 'mapclassify'],
    'lib': ['libpysal']
}

memberships = {'libpysal': 'lib',
               'esda': 'explore',
               'giddy': 'explore',
               'segregation': 'explore',
               'pointpats': 'explore',
               'inequality': 'explore',
               'spaghetti': 'explore',
               'momepy': 'explore',
               'access': 'model',
               'spreg': 'model',
               'spopt': 'model',
               'spglm': 'model',
               'spint': 'model',
               'tobler': 'model',
               'spvcm': 'model',
               'splot': 'viz',
               'mapclassify': 'viz'
}


class cached_property(object):
    """ A property that is only computed once per instance and then replaces
        itself with an ordinary attribute. Deleting the attribute resets the
        property.

        Source: https://github.com/bottlepy/bottle/commit/fa7733e075da0d790d809aa3d2f53071897e6f76
        """

    def __init__(self, func):
        self.__doc__ = getattr(func, '__doc__')
        self.func = func

    def __get__(self, obj, cls):<commit_msg>derive membership rather than statically define<commit_after>"""
Base information for pysal meta package
"""


federation_hierarchy = {
    'explore': ['esda', 'giddy', 'segregation',
                'pointpats', 'inequality',
                 'spaghetti', 'access', 'momepy'],
    'model': ['spreg', 'spglm', 'tobler', 'spint',
              'mgwr', 'spvcm', 'access', 'spopt'],
    'viz': ['splot', 'mapclassify'],
    'lib': ['libpysal']
}

memberships = {}
for key in federation_hierarchy:
    for package in federation_hierarchy[key]:
        memberships[package] = key



class cached_property(object):
    """ A property that is only computed once per instance and then replaces
        itself with an ordinary attribute. Deleting the attribute resets the
        property.

        Source: https://github.com/bottlepy/bottle/commit/fa7733e075da0d790d809aa3d2f53071897e6f76
        """

    def __init__(self, func):
        self.__doc__ = getattr(func, '__doc__')
        self.func = func

    def __get__(self, obj, cls):
{'fraction_non_alphanumeric': 0.1467522052927025, 'fraction_numerical': 0.02165196471531676, 'mean_word_length': 2.335561497326203, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, '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': '599668', 'n_tokens_mistral': 832, 'n_tokens_neox': 781, 'n_words': 190}