<commit_before>__author__ = 'zz'

import re


class SafeString:
    """
    sanitize string
    """
    _dirname_pat = re.compile('\?*\\*\.*<*>*/*\|*')

    def sanitized_dirname(self, value, replace_by=''):
        """replace unsafe char with 'replace_by'
        """
        return self._dirname_pat.sub(replace_by, value)<commit_msg>fix safe_windows_dirname<commit_after>__author__ = 'zz'

import re


class SafeString:
    """
    sanitize string
    """
    _dirname_pat = re.compile(r'\?*\\*\.*<*>*/*\|*')

    def sanitized_dirname(self, value, replace_by=''):
        """replace unsafe char with 'replace_by'
        """
        return self._dirname_pat.sub(replace_by, value)
{'fraction_non_alphanumeric': 0.1695906432748538, 'fraction_numerical': 0.0, 'mean_word_length': 3.0294117647058822, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '2779566', 'n_tokens_mistral': 230, 'n_tokens_neox': 223, 'n_words': 44}