<commit_before># -*- coding: utf-8 -*-
import sys
import socket


def client(message):
    infos = socket.getaddrinfo('127.0.0.1', 5000)
    stream_info = [i for i in infos if i[1] == socket.SOCK_STREAM][0]
    client_socket = socket.socket(*stream_info[:3])

    client_socket.connect(stream_info[-1])

    client_socket.sendall(message.encode('utf8'))

    buffer_length = 16
    echo_complete = False
    while not echo_complete:
        part = client_socket.recv(buffer_length)
        print(part.decode('utf8'))
        if len(part) < buffer_length:
            break

    client_socket.close()


if __name__ == "__main__":
    client(str(sys.argv[1]))<commit_msg>Modified client.py to string buffered message parts together.<commit_after># -*- coding: utf-8 -*-
import sys
import socket
from server import server


def client(message):
    infos = socket.getaddrinfo('127.0.0.1', 5000)
    stream_info = [i for i in infos if i[1] == socket.SOCK_STREAM][0]
    client_socket = socket.socket(*stream_info[:3])

    client_socket.connect(stream_info[-1])

    client_socket.sendall(message.encode('utf8'))

    buffer_msg = ''
    buffer_length = 16
    echo_complete = False
    while not echo_complete:
        part = client_socket.recv(buffer_length)
        buffer_msg += part.decode('utf8')
        if len(part) < buffer_length:
            break
        print(buffer_msg)

    client_socket.close()


if __name__ == "__main__":
    server()
    client(str(sys.argv[1]))
{'fraction_non_alphanumeric': 0.12787550744248985, 'fraction_numerical': 0.02706359945872801, 'mean_word_length': 3.213675213675214, 'pattern_counts': {'":': 2, '<': 5, '<?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': '6045708', 'n_tokens_mistral': 499, 'n_tokens_neox': 469, 'n_words': 102}