<commit_before>def enum(*sequential, **named):
    """
    Creates an "enum" type
    """
    enums = dict(zip(sequential, range(len(sequential))), **named)
    return type('Enum', (), enums)<commit_msg>Added generic methods to deal with character escaping for various shell OSes<commit_after>def enum(*sequential, **named):
    """
    Creates an "enum" type
    """
    enums = dict(zip(sequential, range(len(sequential))), **named)
    return type('Enum', (), enums)

def escapeAllWith(aString, anEscapeString):
    """
    Escape all characters with the escape string.
    @param aString String to escape
    @param anEscapeString String to escape the first string with
    @return Escaped string
    """
    escapedString = list()
    for c in aString:
        escapedString.append(anEscapeString)
        escapedString.append(c)

    return ''.join(escapedString)

def escapePathForUnix(aString):
    """
    Escape all characters with the escape string.
    @param aString String to escape
    @param anEscapeString String to escape the first string with
    @return Escaped string
    """
    path = escapeAllWith(aString,"\\")
    return path

def escapePathForOSIndependentShell(aString):
    """
    Escape all characters with the escape string.
    @param aString String to escape
    @param anEscapeString String to escape the first string with
    @return Escaped string
    """
    return escapePathForUnix(aString)
    
    
    
    

{'fraction_non_alphanumeric': 0.09855272226051, 'fraction_numerical': 0.0, 'mean_word_length': 3.3473053892215567, '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': '449955', 'n_tokens_mistral': 419, 'n_tokens_neox': 416, 'n_words': 133}