<commit_before>import RPi.GPIO as GPIO
from threading import Timer
import socket

class TreadmillSpeed:
    count       = None
    tick_length = None
    stream_time = None
    gpio_pin    = None
    ip          = None
    port        = None
    conn        = None
    addr        = None
    s           = None # Socket object

    def __init__(self, ip='10.42.0.84', port=12345, tick_length=0.6, stream_time=1, gpio_pin=3):
        # Initialise class properties
        self.ip          = ip
        self.port        = port
        self.tick_length = tick_length
        self.stream_time = stream_time
        self.s           = socket.socket(socket.AF_INET, socket.SOCK_STREAM)

        # Set up GPIO
        GPIO.setmode(GPIO.BOARD)
        GPIO.setup(self.gpio_pin, GPIO.IN, pull_up_down = GPIO.PUD_UP)
        GPIO.add_event_detect(self.gpio_pin, GPIO.FALLING, callback=self.pinTriggered, bouncetime=100)

        # Set up networking<commit_msg>Fixed gpio pin bug<commit_after>import RPi.GPIO as GPIO
from threading import Timer
import socket

class TreadmillSpeed:
    count       = None
    tick_length = None
    stream_time = None
    gpio_pin    = None
    ip          = None
    port        = None
    conn        = None
    addr        = None
    s           = None # Socket object

    def __init__(self, ip='10.42.0.84', port=12345, tick_length=0.6, stream_time=1, gpio_pin=3):
        # Initialise class properties
        self.ip          = ip
        self.port        = port
        self.tick_length = tick_length
        self.stream_time = stream_time
        self.s           = socket.socket(socket.AF_INET, socket.SOCK_STREAM)

        # Set up GPIO
        GPIO.setmode(GPIO.BOARD)
        GPIO.setup(gpio_pin, GPIO.IN, pull_up_down = GPIO.PUD_UP)
        GPIO.add_event_detect(gpio_pin, GPIO.FALLING, callback=self.pinTriggered, bouncetime=100)

        # Set up networking
{'fraction_non_alphanumeric': 0.08021108179419525, 'fraction_numerical': 0.020052770448548814, 'mean_word_length': 1.9905362776025237, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 2, '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': '5854303', 'n_tokens_mistral': 623, 'n_tokens_neox': 594, 'n_words': 138}