<commit_before>def camelcase(name):
    """
    Convert new-style method names with underscores to old style camel-case
    names.

    So this function converts ``'assert_equal'`` string to ``'assertEqual' and
    ``'assert_not_equal'`` to ``'assertNotEqual'``.
    """
    return name[0].lower() + \
           name.replace('_', ' ').title().replace(' ', '')[1:]<commit_msg>#26: Add ``camelcase_to_underscore`` and ``underscore_to_camelcase`` utility functions and.<commit_after>def camelcase_to_underscore(name):
    """
    Convert old-style camel-case method names to new-style names with
    underscores.

    ::

        >>> camelcase_to_underscore('assertEqual')
        ... 'assert_equal'
        >>> camelcase_to_underscore('assertNotEqual')
        ... 'assert_not_equal'
        >>> camelcase_to_underscore('assert_equal')
        ... 'assert_equal'
        >>> camelcase_to_underscore('assert_not_equal')
        ... 'assert_not_equal'

    """
    new_name = u''

    for char in name:
        if char.isupper():
            char = char.lower()
            new_name += u'_'

        new_name += char

    return new_name


def underscore_to_camelcase(name):
    """
    Convert new-style method names with underscores to old style camel-case
    names.

    ::

        >>> underscore_to_camelcase('assert_equal')
        ... 'assertEqual'
        >>> underscore_to_camelcase('assert_not_equal')
        ... 'assertNotEqual'
        >>> underscore_to_camelcase('assertEqual')
        ... 'assertEqual'
        >>> underscore_to_camelcase('assertNotEqual')
        ... 'assertNotEqual'

    """
    return name[0].lower() + \
           name.replace('_', ' ').title().replace(' ', '')[1:]
{'fraction_non_alphanumeric': 0.14873603762492651, 'fraction_numerical': 0.003527336860670194, 'mean_word_length': 2.6367521367521367, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 27, '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': '3050267', 'n_tokens_mistral': 539, 'n_tokens_neox': 505, 'n_words': 98}