<commit_before>import websocket
ws = websocket.WebSocket()
wsaddr = "ws://localhost:8090/simulator/_websocket"
print "Connecting to "+wsaddr + "...",
ws.connect(wsaddr)
print "connected"

print " subcribing to parameters...",

ws.send('[1,1,3, {"parameter": "subscribe", "data": { "list" : [ \
           {"name": "/SIMULATOR/SIMULATOR/Alpha"},\
           {"name": "/SIMULATOR/SIMULATOR/Heading"} \
        ]}}]')
print "subscribed"
while True:
    result =  ws.recv()
    print "Received '%s'" % result
<commit_msg>added example for namespace subscription<commit_after>import websocket
ws = websocket.WebSocket()
wsaddr = "ws://localhost:8090/simulator/_websocket"
print "Connecting to "+wsaddr + "...",
ws.connect(wsaddr)
print "connected"

print " subcribing to parameters...",

ws.send('[1,1,3, {"parameter": "subscribe", "data": { "list" : [ \
           {"name": "/SIMULATOR/SIMULATOR/Alpha"},\
           {"name": "/SIMULATOR/SIMULATOR/Heading"}, \
           {"name": "SIMULATOR_PrimBusVoltage1", "namespace": "MDB:OPS Name"}\
        ]}}]')
print "subscribed"
while True:
    result =  ws.recv()
    print "Received '%s'" % result

{'fraction_non_alphanumeric': 0.19281332164767748, 'fraction_numerical': 0.013146362839614373, 'mean_word_length': 3.6048387096774195, 'pattern_counts': {'":': 10, '<': 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': '2393273', 'n_tokens_mistral': 394, 'n_tokens_neox': 380, 'n_words': 81}