<commit_before>"""A basic script to demonstrate usage of the cb2_receive module.

There are a few lines which are commented out. Uncomment these lines to see a
demonstration of the parallel nature of the cb2_receive module.

Copyright (c) 2016 GTRC. All rights reserved.
"""

import socket
import time
from contextlib import closing
import cb2_receive


def main():
    host = "192.168.1.100"    # The remote host
    port = 30003              # The same port as used by the server

    with closing(socket.socket(socket.AF_INET, socket.SOCK_STREAM))\
            as robot_socket:
        robot_socket.connect((host, port))
        with cb2_receive.URReceiver(robot_socket, True) as my_ur_receiver:
            my_ur_receiver.start()
            # some_num = 0
            while True:
                # print "\n\n" + str(some_num) + "\n\n"
                # some_num += 1
                time.sleep(.25)<commit_msg>added support to call the script directly<commit_after>"""A basic script to demonstrate usage of the cb2_receive module.

There are a few lines which are commented out. Uncomment these lines to see a
demonstration of the parallel nature of the cb2_receive module.

Copyright (c) 2016 GTRC. All rights reserved.
"""

import socket
import time
from contextlib import closing
import cb2_receive


def main():
    host = "192.168.1.100"    # The remote host
    port = 30003              # The same port as used by the server

    with closing(socket.socket(socket.AF_INET, socket.SOCK_STREAM))\
            as robot_socket:
        robot_socket.connect((host, port))
        with cb2_receive.URReceiver(robot_socket, True) as my_ur_receiver:
            my_ur_receiver.start()
            # some_num = 0
            while True:
                # print "\n\n" + str(some_num) + "\n\n"
                # some_num += 1
                time.sleep(.25)

if __name__ == "__main__":
    main()
{'fraction_non_alphanumeric': 0.08267509215376515, 'fraction_numerical': 0.02843601895734597, 'mean_word_length': 2.4111310592459607, 'pattern_counts': {'":': 1, '<': 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': '2633507', 'n_tokens_mistral': 606, 'n_tokens_neox': 545, 'n_words': 193}