<commit_before>#!/usr/bin/env python
# -*- coding: utf-8 -*-

import socket
import fileinput

TCP_IP = '127.0.0.1'
TCP_PORT = 3000
BUFFER_SIZE = 1024

user = "colin"

login_creds = '{"LoginCredentials":{"user":"' + user + '"}\n}'

s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
s.connect((TCP_IP, TCP_PORT))
s.send(login_creds)

user_to = "someone"

for line in fileinput.input():
    line = line.strip()
    line = line.decode('utf-8', 'ignore').encode('utf-8')

    # Insert code to handle switching users that we're talking to

    message =
    '{"Message":{"to":"' + someone + '","from":"' + colin + '","msg":"' + line + '"}}\n'

    s.send(message)
<commit_msg>got it working follow this shit<commit_after>#!/usr/bin/env python
# -*- coding: utf-8 -*-

import socket
import fileinput

TCP_IP = '127.0.0.1'
TCP_PORT = 3000
BUFFER_SIZE = 1024

user = "colin"

login_creds = '{"LoginCredentials":{"user":"' + user + '"}}\n'

s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
s.connect((TCP_IP, TCP_PORT))
s.send(login_creds)

user_to = "someone"

for line in fileinput.input():
    # Insert code to handle switching users that we're talking to
    line = line.strip()
    line = line.decode('utf-8', 'ignore').encode('utf-8')

    message = '"Message"{"to":"' + user_to + '","from":"' + user + '","msg":"' + line + '"}\n'

    s.send(message)

{'fraction_non_alphanumeric': 0.1982313927781872, 'fraction_numerical': 0.025055268975681652, 'mean_word_length': 3.938181818181818, 'pattern_counts': {'":': 11, '<': 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': '4374677', 'n_tokens_mistral': 525, 'n_tokens_neox': 490, 'n_words': 117}