<commit_before># coding: utf-8
class RPiLock(object):
    """RPiLock class."""
    def __init__(self, pigio_instace, io_client):
        """RPiLock instance with open socketio connection."""
        self.io_client = io_client
        self.pi = pigio_instace
        self.avail_actions = {
            'unlock': 600,
            'lock': 2400,
        }

    def control(self, action, pin_num=18):
        """Output approriate control signal and pulswidth to the GPIO pins."""
        pulsewidth = self.avail_actions.get(action, None)
        if not pulsewidth:
            raise ValueError('Action not permitted')
        self.pi.set_servo_pulsewidth(pin_num, pulsewidth)
        return self.pi.get_servo_pulsewidth(pin_num)

    def listen_to_signal(self):
        for action in self.avail_actions:
            self.io_client.on(action, lambda x: self.lock_control(action))<commit_msg>bug fix, renamed lock_control to control on RPi class<commit_after># coding: utf-8
class RPiLock(object):
    """RPiLock class."""
    def __init__(self, pigio_instace, io_client):
        """RPiLock instance with open socketio connection."""
        self.io_client = io_client
        self.pi = pigio_instace
        self.avail_actions = {
            'unlock': 600,
            'lock': 2400,
        }

    def control(self, action, pin_num=18):
        """Output approriate control signal and pulswidth to the GPIO pins."""
        pulsewidth = self.avail_actions.get(action, None)
        if not pulsewidth:
            raise ValueError('Action not permitted')
        self.pi.set_servo_pulsewidth(pin_num, pulsewidth)
        return self.pi.get_servo_pulsewidth(pin_num)

    def listen_to_signal(self):
        for action in self.avail_actions:
            self.io_client.on(action, lambda x: self.control(action))
{'fraction_non_alphanumeric': 0.10138504155124654, 'fraction_numerical': 0.0110803324099723, 'mean_word_length': 2.6932515337423313, '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': '5569960', 'n_tokens_mistral': 563, 'n_tokens_neox': 540, 'n_words': 135}