<commit_before>import threading
try:
    import prctl
    def set_thread_name(name): prctl.set_name(name)

    def _thread_name_hack(self):
        set_thread_name(self.name)
        threading.Thread.__bootstrap_original__(self)

    threading.Thread.__bootstrap_original__ = threading.Thread._Thread__bootstrap
    threading.Thread._Thread__bootstrap = _thread_name_hack
except ImportError:
    log('WARN: prctl module is not installed. You will not be able to see thread names')
    def set_thread_name(name): pass

class StoppableThread(object):
    def initStop(self):
        self.stop = threading.Event()
        self._stopped = False
        
    def stopThread(self):
        self._stopped = True
        self.stop.set()
<commit_msg>Remove buggy log message if prctl is missing<commit_after>import threading
try:
    import prctl
    def set_thread_name(name): prctl.set_name(name)

    def _thread_name_hack(self):
        set_thread_name(self.name)
        threading.Thread.__bootstrap_original__(self)

    threading.Thread.__bootstrap_original__ = threading.Thread._Thread__bootstrap
    threading.Thread._Thread__bootstrap = _thread_name_hack
except ImportError:
    def set_thread_name(name): pass

class StoppableThread(object):
    def initStop(self):
        self.stop = threading.Event()
        self._stopped = False
        
    def stopThread(self):
        self._stopped = True
        self.stop.set()

{'fraction_non_alphanumeric': 0.0800561797752809, 'fraction_numerical': 0.0, 'mean_word_length': 3.4254658385093166, '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': '5289711', 'n_tokens_mistral': 429, 'n_tokens_neox': 424, 'n_words': 90}