<commit_before>#!/usr/bin/python
import zmq
import sys

request=b"ALIESD"
endpoint="tcp://localhost:60200"
if len(sys.argv)>1:
  request=sys.argv[1];
if len(sys.argv)>2:
  endpoint=sys.argv[2];

#  Prepare our context and sockets
context = zmq.Context()
socket = context.socket(zmq.REQ)
socket.connect(endpoint)

#send request
socket.send(request)
print("sent request: "+request)

#receive reply (multipart)
msg = socket.recv_multipart();
print "topic: "+str(msg[0])
print "messagesize: "+str(sys.getsizeof(msg[1]))<commit_msg>zmqRequester.py: update<commit_after>#!/usr/bin/python
import zmq
import sys

request=b"ALIESD"
endpoint="tcp://localhost:60200"
if len(sys.argv)>1:
  request=sys.argv[1];
if len(sys.argv)>2:
  endpoint=sys.argv[2];

#  Prepare our context and sockets
context = zmq.Context()
socket = context.socket(zmq.REQ)
socket.connect(endpoint)

#send request
socket.send(request,zmq.SNDMORE)
socket.send(request)
print("sent request: "+request)

#receive reply (multipart)
msg = socket.recv_multipart();
print "_________________________"
i=0;
for message in msg:
  if i==0:
    print "topic: "+str(message)
    i=1
  elif i==1:
    print "  messagesize: "+str(sys.getsizeof(message))
    i=0
{'fraction_non_alphanumeric': 0.15894039735099338, 'fraction_numerical': 0.020695364238410598, 'mean_word_length': 5.830508474576271, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, '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': '6699248', 'n_tokens_mistral': 451, 'n_tokens_neox': 438, 'n_words': 93}