<commit_before>import RPi.GPIO as GPIO

class FakeToggle(object):

    def __init__(self, source):
        self.state = False

    def set(self, state):
        self.state = bool(state)

    def get(self):
        return self.state

class RelayToggle(object):

    def __init__(self, source):
        self.pin = source
        GPIO.setmode(GPIO.BOARD)
        GPIO.setup(self.pin, GPIO.OUT)

    def set(self, state):
        GPIO.output(self.pin, state)

    def get(self):
        return GPIO.input(self.pin) in (1, GPIO.HIGH, True)

TOGGLES = {<commit_msg>Fix gpio toggle.<commit_after>import RPi.GPIO as GPIO

class FakeToggle(object):

    def __init__(self, source):
        self.state = False

    def set(self, state):
        self.state = bool(state)

    def get(self):
        return self.state

class RelayToggle(object):

    def __init__(self, source):
        self.pin = int(source)
        GPIO.setmode(GPIO.BCM)
        GPIO.setup(self.pin, GPIO.OUT)

    def set(self, state):
        GPIO.output(self.pin, state)

    def get(self):
        return GPIO.input(self.pin) in (1, GPIO.HIGH, True)

TOGGLES = {
{'fraction_non_alphanumeric': 0.12188612099644128, 'fraction_numerical': 0.0017793594306049821, 'mean_word_length': 2.4722222222222223, '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': '590691', 'n_tokens_mistral': 381, 'n_tokens_neox': 372, 'n_words': 90}