<commit_before>#!/usr/bin/env python
# -*- coding: utf-8 -*-
import platform


def patch_pyhook_64bit():
    import pyHook
    from PyHook import KeyboardEvent

    def KeyboardSwitch(
        self, msg, vk_code, scan_code, ascii, flags, time, hwnd, win_name
    ):
        event = KeyboardEvent(
            msg, vk_code, scan_code, ascii, flags, time, hwnd, win_name
        )
        # This seems to fix the annoying TypeError on 64bit Windows
        func = self.keyboard_funcs.get(int(str(msg)))
        if func:
            return func(event)
        else:
            return True
    pyHook.HookManager.KeyboardSwitch = KeyboardSwitch


def patch_all():<commit_msg>Add reference to patch module<commit_after>#!/usr/bin/env python
# -*- coding: utf-8 -*-
import platform


def patch_pyhook_64bit():
    # This patch comes from pyHook bug#1:
    # https://sourceforge.net/p/pyhook/bugs/1/
    import pyHook
    from PyHook import KeyboardEvent

    def KeyboardSwitch(
        self, msg, vk_code, scan_code, ascii, flags, time, hwnd, win_name
    ):
        event = KeyboardEvent(
            msg, vk_code, scan_code, ascii, flags, time, hwnd, win_name
        )
        # This seems to fix the annoying TypeError on 64bit Windows
        func = self.keyboard_funcs.get(int(str(msg)))
        if func:
            return func(event)
        else:
            return True
    pyHook.HookManager.KeyboardSwitch = KeyboardSwitch


def patch_all():
{'fraction_non_alphanumeric': 0.09316770186335403, 'fraction_numerical': 0.008281573498964804, 'mean_word_length': 2.4523809523809526, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 1, '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': '1473670', 'n_tokens_mistral': 465, 'n_tokens_neox': 450, 'n_words': 126}