<commit_before>from __future__ import with_statement
from contextlib import contextmanager
import os
import threading
import time
import SocketServer
import xmlrpclib
from xmlrpclib import ProtocolError
from robot.errors import HandlerExecutionFailed, TimeoutError
from robot.libraries.Process import Process
from robot.libraries.Remote import Remote
from robot.running import EXECUTION_CONTEXTS
from robot.running.namespace import IMPORTER
from robot.running.testlibraries import TestLibrary
from robot.libraries.BuiltIn import BuiltIn
from robot.api import logger

REMOTE_AGENTS_LIST = []
EXPECTED_AGENT_RECEIVED = threading.Event()

class SimpleServer(SocketServer.BaseRequestHandler):

    def handle(self):
        data = ''.join(iter(self.read_socket, ''))
        port, name = data.decode().split(':', 1)
        print '*DEBUG:%d* Registered java rappio agent "%s" at port %s' % (time.time()*1000, name, port)
        REMOTE_AGENTS_LIST.append(port)
        EXPECTED_AGENT_RECEIVED.set()<commit_msg>ignore connection from sikuli<commit_after>from __future__ import with_statement
from contextlib import contextmanager
import os
import threading
import time
import SocketServer
import xmlrpclib
from xmlrpclib import ProtocolError
from robot.errors import HandlerExecutionFailed, TimeoutError
from robot.libraries.Process import Process
from robot.libraries.Remote import Remote
from robot.running import EXECUTION_CONTEXTS
from robot.running.namespace import IMPORTER
from robot.running.testlibraries import TestLibrary
from robot.libraries.BuiltIn import BuiltIn
from robot.api import logger

REMOTE_AGENTS_LIST = []
EXPECTED_AGENT_RECEIVED = threading.Event()

class SimpleServer(SocketServer.BaseRequestHandler):

    def handle(self):
        data = ''.join(iter(self.read_socket, ''))
        port, name = data.decode().split(':', 1)
        if 'sikuli' in name:
            print '*DEBUG:%d* Connection try from sikuli - ignoring it' % (time.time()*1000)
        else:
            print '*DEBUG:%d* Registered java rappio agent "%s" at port %s' % (time.time()*1000, name, port)
            REMOTE_AGENTS_LIST.append(port)
            EXPECTED_AGENT_RECEIVED.set()
{'fraction_non_alphanumeric': 0.0818014705882353, 'fraction_numerical': 0.006433823529411764, 'mean_word_length': 4.7592592592592595, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 4}, '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': '5868837', 'n_tokens_mistral': 652, 'n_tokens_neox': 625, 'n_words': 182}