<commit_before>def determine_type(obj):
    """ Recursively queries a type and returns a map of the object
    with the named fields and their types.
    """ 
    if obj is None:
        return None
    elif isinstance(obj, str):
        return str
    elif isinstance(obj, int):
        return int
    elif isinstance(obj, float):
        return float
    elif isinstance(obj, list):
        return list(map(determine_type, obj))
    elif isinstance(obj, dict):
        return { k: determine_type(obj[k]) for k in obj.keys() }
    raise NotImplemented('Unknown type {0!r}'.format(obj))
<commit_msg>python2.6 doesn't support list comprehension<commit_after>def determine_type(obj):
    """ Recursively queries a type and returns a map of the object
    with the named fields and their types.
    """ 
    if obj is None:
        return None
    elif isinstance(obj, str):
        return str
    elif isinstance(obj, int):
        return int
    elif isinstance(obj, float):
        return float
    elif isinstance(obj, list):
        return list(map(determine_type, obj))
    elif isinstance(obj, dict):
        return dict(( (k, determine_type(obj[k]))
                      for k in obj.keys() ))
    raise NotImplemented('Unknown type {0!r}'.format(obj))

{'fraction_non_alphanumeric': 0.09849086576648133, 'fraction_numerical': 0.003177124702144559, 'mean_word_length': 2.6842105263157894, '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': '6234716', 'n_tokens_mistral': 354, 'n_tokens_neox': 348, 'n_words': 127}