<commit_before># -*- coding: UTF-8 -*-

"""
tools.py:
  small functions or classes that don't have a home elsewhere
"""

__author__ = '<NAME> <<EMAIL>>'
__version__ = '$Revision: 36 $'[11:-2]
__vssauthor__ = '$Author: Jaraco $'[9:-2]
__date__ = '$Modtime: 27-09-04 11:24 $'[10:-2]

import string, urllib, os
import logging

log = logging.getLogger( 'tools' )

# DictMap is much like the built-in function map.  It takes a dictionary
#  and applys a function to the values of that dictionary, returning a
#  new dictionary with the mapped values in the original keys.
def DictMap( function, dictionary ):
	return dict( zip( dictionary.keys(), map( function, dictionary.values() ) ) )
<commit_msg>Fixed all of the module tags to use svnauthor instead of vssauthor. Changed all to use svn keywords.<commit_after># -*- coding: UTF-8 -*-

"""
tools.py:
  small functions or classes that don't have a home elsewhere
"""

__author__ = '<NAME> <<EMAIL>>'
__version__ = '$Rev: 36 $'[6:-2]
__svnauthor__ = '$Author: Jaraco $'[9:-2]
__date__ = '$Date: 27-09-04 11:24 $'[7:-2]

import string, urllib, os
import logging

log = logging.getLogger( 'tools' )

# DictMap is much like the built-in function map.  It takes a dictionary
#  and applys a function to the values of that dictionary, returning a
#  new dictionary with the mapped values in the original keys.
def DictMap( function, dictionary ):
	return dict( zip( dictionary.keys(), map( function, dictionary.values() ) ) )

{'fraction_non_alphanumeric': 0.13224267211997273, 'fraction_numerical': 0.027266530334014997, 'mean_word_length': 4.280575539568345, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, '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': '387875', 'n_tokens_mistral': 495, 'n_tokens_neox': 469, 'n_words': 185}