<commit_before>import sys
print(sys.version_info)
import random
import time

import networkzero as nw0

with open("quotes.txt") as f:
    quotes = [line.strip() for line in f]

def main(address_pattern=None):
    my_name = input("Name: ")
    my_address = nw0.advertise(my_name, address_pattern)
    print("Advertising %s on %s" % (my_name, my_address))

    while True:
        services = [(name, address) for (name, address) in nw0.discover_all() if name != my_name]

        for name, address in services:
            topic, message = nw0.wait_for_notification(address, "quote", wait_for_s=0)
            if topic:
                print("%s says: %s" % (name, message))
        
        quote = random.choice(quotes)
        nw0.send_notification(my_address, "quote", quote)
        
        time.sleep(1)

if __name__ == '__main__':
    main(*sys.argv[1:])<commit_msg>Rework quotes to use multiple notification<commit_after>import sys
print(sys.version_info)
import random
import time

import networkzero as nw0

with open("quotes.txt") as f:
    quotes = [line.strip() for line in f]

def main(address_pattern=None):
    my_name = input("Name: ")
    my_address = nw0.advertise(my_name, address_pattern)
    print("Advertising %s on %s" % (my_name, my_address))

    while True:
        services = [address for (name, address) in nw0.discover_all() if name != my_name]

        topic, message = nw0.wait_for_notification(services, "quote", wait_for_s=0)
        if topic:
            incoming_name, incoming_quote = message
            print("%s says: %s" % (incoming_name, incoming_quote))
        
        quote = random.choice(quotes)
        nw0.send_notification(my_address, "quote", (my_name, quote))
        
        time.sleep(1)

if __name__ == '__main__':
    main(*sys.argv[1:])
{'fraction_non_alphanumeric': 0.12040133779264214, 'fraction_numerical': 0.008918617614269788, 'mean_word_length': 3.070294784580499, 'pattern_counts': {'":': 0, '<': 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': '7025882', 'n_tokens_mistral': 601, 'n_tokens_neox': 592, 'n_words': 150}