<commit_before>import itertools

import classad
import htcondor

# Add htcondor.param.get() to old versions of condor-python that don't have it
try:
    htcondor.param.get
except AttributeError:
    def _htcondor_param_get(key, default=None):
        try:
            return htcondor.param[key]
        except KeyError:
            return default
    htcondor.param.get = _htcondor_param_get


class ResourceAd(classad.ClassAd):
    """Contains information about a resource in a ResourceCatalog
    Members:
        ce_ad:         The classad the ResourceCatalog was found in.
        catalog_entry: The classad in OSG_ResourceCatalog that corresponds
                       to this resource.

    """

    def __init__(self, ce_ad, catalog_entry):
        super(self.__class__, self).__init__()

        self.ce_ad         = ce_ad
        self.catalog_entry = catalog_entry

        for cekey in ['OSG_Resource', 'OSG_ResourceGroup', 'OSG_BatchSystems']:<commit_msg>Fix calling superclass's constructor in ResourceAd<commit_after>import itertools

import classad
import htcondor

# Add htcondor.param.get() to old versions of condor-python that don't have it
try:
    htcondor.param.get
except AttributeError:
    def _htcondor_param_get(key, default=None):
        try:
            return htcondor.param[key]
        except KeyError:
            return default
    htcondor.param.get = _htcondor_param_get


class ResourceAd(classad.ClassAd):
    """Contains information about a resource in a ResourceCatalog
    Members:
        ce_ad:         The classad the ResourceCatalog was found in.
        catalog_entry: The classad in OSG_ResourceCatalog that corresponds
                       to this resource.

    """

    def __init__(self, ce_ad, catalog_entry):
        classad.ClassAd.__init__(self, '[]')

        self.ce_ad         = ce_ad
        self.catalog_entry = catalog_entry

        for cekey in ['OSG_Resource', 'OSG_ResourceGroup', 'OSG_BatchSystems']:
{'fraction_non_alphanumeric': 0.07160995429151853, 'fraction_numerical': 0.0, 'mean_word_length': 2.7452471482889735, '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': '7458276', 'n_tokens_mistral': 587, 'n_tokens_neox': 575, 'n_words': 159}