<commit_before>#!/usr/bin/python

# Connects two copy-paste samples running on localhost.
# TODO: add host/port args.

import socket
import time

getter = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
getter.connect(("localhost", 9000))

giver = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
giver.connect(("localhost", 9010))

print "connecting to getter"
getter.send("GET\n")
time.sleep(1.0)
offer_sdp = getter.recv(4096)
print "connecting to giver, sending " + offer_sdp
giver.send("GIVE " + offer_sdp + "\n")
time.sleep(1.0)
answer_sdp = giver.recv(4096)
print "from giver, got " + answer_sdp
getter.send(answer_sdp)
print "sent to getter"<commit_msg>wait a bit longer to receive offer and answer<commit_after>#!/usr/bin/python

# Connects two copy-paste samples running on localhost.
# TODO: add host/port args.

import socket
import time

getter = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
getter.connect(("localhost", 9000))

giver = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
giver.connect(("localhost", 9010))

print "connecting to getter"
getter.send("GET\n")
time.sleep(3.0)
offer_sdp = getter.recv(4096)
print "connecting to giver, sending " + offer_sdp
giver.send("GIVE " + offer_sdp + "\n")
time.sleep(3.0)
answer_sdp = giver.recv(4096)
print "from giver, got " + answer_sdp
getter.send(answer_sdp)
print "sent to getter"
{'fraction_non_alphanumeric': 0.13549337260677466, 'fraction_numerical': 0.029455081001472753, 'mean_word_length': 5.565217391304348, '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': '1348432', 'n_tokens_mistral': 535, 'n_tokens_neox': 502, 'n_words': 119}