<commit_before>import socket

try:
    while True:
        server_socket = socket.socket(
            socket.AF_INET,
            socket.SOCK_STREAM,
            socket.IPPROTO_TCP)

        address = ('127.0.0.1', 50000)
        server_socket.bind(address)
        server_socket.listen(1)
        connection, client_address = server_socket.accept()
        buffersize = 16
        echomsg = connection.recv(buffersize)
        connection.sendall(echomsg)
        connection.shutdown(socket.SHUT_WR)
        connection.close()

except KeyboardInterrupt:
    server_socket.close()
<commit_msg>added a loop to let it recieve the full message<commit_after>import socket

try:
    server_socket = socket.socket(
        socket.AF_INET,
        socket.SOCK_STREAM,
        socket.IPPROTO_TCP)

    address = ('127.0.0.1', 50000)
    server_socket.bind(address)
    server_socket.listen(1)
    while True:
        connection, client_address = server_socket.accept()
        buffersize = 32
        response = ''
        done = False
        while not done:
            msg_part = connection.recv(buffersize)
            if len(msg_part) < buffersize:
                done = True
            response += msg_part
        connection.sendall(response)
        connection.shutdown(socket.SHUT_WR)
        connection.close()

except KeyboardInterrupt:
    server_socket.close()

{'fraction_non_alphanumeric': 0.08632040965618142, 'fraction_numerical': 0.020482809070958303, 'mean_word_length': 2.2494061757719717, 'pattern_counts': {'":': 0, '<': 4, '<?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': '4067189', 'n_tokens_mistral': 418, 'n_tokens_neox': 395, 'n_words': 78}