<commit_before>import socket

# UDP server
UDPSock = socket.socket(socket.AF_INET,socket.SOCK_DGRAM)
UDPSock.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)

# Listen on port 10000
# (to all IP addresses on this system)
listen_addr = ("",10000)
UDPSock.bind(listen_addr)

stream_lists = {}

# Report on all data packets received
# data -> <tipo>:<nome>
print 'Server online'
while True:
        data, addr = UDPSock.recvfrom(1024)
        string = data.split(':')
        print string
        print data, addr
        print stream_lists
        if string[0] == 'stream':
            stream_lists[string[1]] = addr
        elif string[0] == 'viewer':
            UDPSock.sendto(str(stream_lists), addr)
            
<commit_msg>DNS Pronto<commit_after>import socket

# UDP server
UDPSock = socket.socket(socket.AF_INET,socket.SOCK_DGRAM)
UDPSock.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)

# Listen on port 10000
# (to all IP addresses on this system)
listen_addr = ("",10000)
UDPSock.bind(listen_addr)

stream_lists = {}

# Report on all data packets received
# data -> <tipo>:<nome>
print 'CascadeTV DNS online'
while True:
        data, addr = UDPSock.recvfrom(1024)
        string = data.split(':')
        print string
        print data, addr
        print " --Stream List-- "
	print stream_lists
	#Se recebeu uma mensagem de uma stream,adiciona a stream na lista de todas as stream
        if string[0] == 'stream':
            stream_lists[string[1]] = addr
	#se recebeu uma mensagem de um viewer ele envia de volta uma lista com todas as streams e o ip dos streamers
        elif string[0] == 'viewer':
            UDPSock.sendto(str(stream_lists), addr)
            

{'fraction_non_alphanumeric': 0.1045481393975192, 'fraction_numerical': 0.021264028352037802, 'mean_word_length': 3.0721153846153846, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 9, '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': '5634854', 'n_tokens_mistral': 584, 'n_tokens_neox': 547, 'n_words': 160}