<commit_before>import random

greeting_words = [
    "hi","hey","hello","yo","yoyo","greetings",
    "howdy","sup","wasup"
]
leaving_words = [
    "bye","cya","seeya","later","bai"
]
laughing_words = [
    "lol","lolz","hehe","haha","i don't get it","rofl",
    "lmfao","lmfao","jokes are funny","not funny"
]
reactions = [
    "How about never? Is never good for you?",
    "You sound reasonable... Time to up the medication.",
    "I see you've set aside this special time to humiliate yourself in public.",
    "I don't work here. I'm a consultant.",
    "Ahhh... I see the screw-up fairy has visited us again",
    "I don't know what your problem is, but I'll bet it's hard to pronounce.",
    "I like you. You remind me of when I was young and stupid.",
    "You are validating my inherent mistrust of strangers.",
    "I'll try being nicer if you'll try being smarter.",
    "I'm out of my mind, but feel free to leave a message.",
    "I'm really easy to get along with once you people learn to worship me.",
    "It sounds like English, but I can't understand a word you're saying.",
    "I can see your point, but I still think you're full of it.",
    "What am I? Flypaper for freaks!?",
    "Any connection between your reality and mine is purely coincidental.",
    "I have plenty of talent and vision. I just don't give a damn.",
    "I'm already visualizing the duct tape over your mouth.",
    "Your teeth are brighter than you is.",
    "No, my powers can only be used for good.",
    "We're all refreshed and challenged by your unique point of view.",
    "The fact that no one understands you doesn't mean you're an artist.",
    "I will always cherish the initial misconceptions I had about you.",
    "Who me? I just wander from room to room.",
    "I'm not being rude. You're just insignificant.",
    "It's a thankless job, but I've got a lot of Karma to burn off."
]

def response_event(ctx, serv, nick, dest, msg):
    msg = msg.lower()
    
    for w in greeting_words:
        if msg == w:
            serv.send("PRIVMSG %s :%s\n" % (
                dest, random.choice(greeting_words)))
            return True
        elif w in msg and NICK in msg:
            serv.send("PRIVMSG %s :%s %s\n" % (
                dest, random.choice(greeting_words), nick))
            return True
    
    for w in leaving_words:
        if msg == w or msg.startswith(w+" ") or msg.endswith(" "+w):
            serv.send("PRIVMSG %s :%s\n" % (
                dest, random.choice(leaving_words)))
            return True
        
    for w in laughing_words:
        if msg == w or msg.startswith(w+" ") or msg.endswith(" "+w):
            if random.random() > 0.75:
                serv.send("PRIVMSG %s :%s\n" % (
                    dest, random.choice(laughing_words)))
            return True

    if NICK in msg:
        serv.send("PRIVMSG %s :%s\n" % (dest, random.choice(reactions)))
        return True

serv.on_msg.connect(response_event, "greet")
<commit_msg>changes to greet<commit_after>import random

greeting_words = [
    "hi","hey","hello","yo","yoyo","greetings","hiya",
    "howdy","sup","wasup","whatsup","whats up","what's up"
]
leaving_words = [
    "bye","cya","seeya","later","bai"
]
laughing_words = [
    "lol","lolz","hehe","haha","i don't get it","rofl",
    "lmfao","lmfao","jokes are funny","not funny"
]
reactions = [
    "How about never? Is never good for you?",
    "You sound reasonable... Time to up the medication.",
    "I see you've set aside this special time to humiliate yourself in public.",
    "I don't work here. I'm a consultant.",
    "Ahhh... I see the screw-up fairy has visited us again",
    "I don't know what your problem is, but I'll bet it's hard to pronounce.",
    "I like you. You remind me of when I was young and stupid.",
    "You are validating my inherent mistrust of strangers.",
    "I'll try being nicer if you'll try being smarter.",
    "I'm out of my mind, but feel free to leave a message.",
    "I'm really easy to get along with once you people learn to worship me.",
    "It sounds like English, but I can't understand a word you're saying.",
    "I can see your point, but I still think you're full of it.",
    "What am I? Flypaper for freaks!?",
    "Any connection between your reality and mine is purely coincidental.",
    "I have plenty of talent and vision. I just don't give a damn.",
    "I'm already visualizing the duct tape over your mouth.",
    "Your teeth are brighter than you is.",
    "No, my powers can only be used for good.",
    "We're all refreshed and challenged by your unique point of view.",
    "The fact that no one understands you doesn't mean you're an artist.",
    "I will always cherish the initial misconceptions I had about you.",
    "Who me? I just wander from room to room.",
    "I'm not being rude. You're just insignificant.",
    "It's a thankless job, but I've got a lot of Karma to burn off."
]

def response_event(ctx, serv, nick, dest, msg):
    msg = msg.lower()
    msg = msg.replace("?", " ").replace("!", " ").replace(".", " ")
    
    for w in greeting_words:
        if msg == w:
            serv.send("PRIVMSG %s :%s\n" % (
                dest, random.choice(greeting_words)))
            return True
        elif msg.startswith(w) or msg.endswith(w):
            if NICK in msg:
                serv.send("PRIVMSG %s :%s %s\n" % (
                    dest, random.choice(greeting_words), nick))
                return True
        
    for w in leaving_words:
        if msg == w or msg.startswith(w+" ") or msg.endswith(" "+w):
            serv.send("PRIVMSG %s :%s\n" % (
                dest, random.choice(leaving_words)))
            return True
        
    for w in laughing_words:
        if msg == w or msg.startswith(w+" ") or msg.endswith(" "+w):
            if random.random() > 0.50:
                serv.send("PRIVMSG %s :%s\n" % (
                    dest, random.choice(laughing_words)))
            return True

    if NICK in msg:
        serv.send("PRIVMSG %s :%s\n" % (dest, random.choice(reactions)))
        return True

serv.on_msg.connect(response_event, "greet")

{'fraction_non_alphanumeric': 0.128485243763248, 'fraction_numerical': 0.0009783140388064568, 'mean_word_length': 2.521239954075775, 'pattern_counts': {'":': 0, '<': 3, '<?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': '1151920', 'n_tokens_mistral': 1951, 'n_tokens_neox': 1849, 'n_words': 746}