<commit_before>#!/usr/bin/env python

# <EMAIL>
# 2017.09.27

import socket

HOST = "localhost"
PORT = 3001

class Unique:
    def __init__(self, host, port):
        self.host = host
        self.port = port
        self.sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)

    def open(self):
        self.sock.connect((self.host, self.port))

    def send(self, cmd):
        self.sock.send(cmd)
        data = self.sock.recv(64)
        print 'received', repr(data)

    def close(self):
        self.sock.close()


if __name__ == '__main__':
    u = Unique(HOST, PORT)
    u.open()
    u.send("uuid")
    u.send("ulid")
    u.send("guid")
    u.send("tsid")
    u.send("txid")
    u.send("bytes")
    u.send("version")
    u.close()
<commit_msg>updated python script to continuously loop<commit_after>#!/usr/bin/env python

# <EMAIL>
# 2017.09.27

import socket
import time

HOST = "localhost"
PORT = 3001

class Unique:
    def __init__(self, host, port):
        self.host = host
        self.port = port
        self.sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)

    def open(self):
        self.sock.connect((self.host, self.port))

    def send(self, cmd):
        self.sock.send(cmd)
        data = self.sock.recv(64)
        print cmd, repr(data.rstrip())

    def close(self):
        self.sock.close()


if __name__ == '__main__':
    u = Unique(HOST, PORT)
    u.open()
    while True:
        cmds = [ "uuid", "ulid", "guid", "tsid", "txid", "bytes", "ping", "version" ]
        for cmd in cmds:
            u.send(cmd)

        time.sleep(2)

    u.close()


{'fraction_non_alphanumeric': 0.15452261306532664, 'fraction_numerical': 0.01821608040201005, 'mean_word_length': 2.3326359832635983, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '4786024', 'n_tokens_mistral': 603, 'n_tokens_neox': 560, 'n_words': 125}