<commit_before>import socket

class TCPConnectExperiment():
    def __init__(self, input=None):
        if not input:
            raise Exception

        self.input = input
        self.host = None
        self.port = None

    def process_input(self):
        for line in self.input:
            yield line.split(' ')

    def run(self):
        for (self.host, self.port) in self.process_input():
            err = self.tcp_connect()

            if err: return err

    def tcp_connect(self):
        try:
            s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
            s.connect((self.host, int(self.port)))
            s.close()
        except socket.error as msg:
            return msg<commit_msg>whitespace cleanup<commit_after>import socket

class TCPConnectExperiment:
    def __init__(self, input=None):
        if not input:
            raise Exception

        self.input = input
        self.host = None
        self.port = None

    def process_input(self):
        for line in self.input:
            yield line.split(' ')

    def run(self):
        for (self.host, self.port) in self.process_input():
            err = self.tcp_connect()

            if err: return err

    def tcp_connect(self):
        try:
            s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
            s.connect((self.host, int(self.port)))
            s.close()
        except socket.error as msg:
            return msg
{'fraction_non_alphanumeric': 0.09715475364330327, 'fraction_numerical': 0.0, 'mean_word_length': 1.7837837837837838, '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': '6581815', 'n_tokens_mistral': 414, 'n_tokens_neox': 401, 'n_words': 108}