<commit_before># -*- coding: utf-8 -*-

from stdPlugin import stdPlugin

class autopan(stdPlugin):

    events = {'pubmsg': {'priority': 1, 'exclusive': True}}

    targets = (
            ('coin', 'pan'),
            ('nioc', 'nap'),
            ('\_o<', '\_x<'),
            ('>o_/', '>x_/'),
            (u'ᴎIOↃ', u'ᴎAP'),
        )

    def on_pubmsg(self, serv, ev, helper):
        for coin, pan in self.targets:
            if helper['message'].find(coin) >= 0:
                serv.privmsg(helper['target'], pan)
                # only trigger one time per msg
                return True<commit_msg>Add raaatatata in autopan<commit_after># -*- coding: utf-8 -*-

from stdPlugin import stdPlugin

class autopan(stdPlugin):

    events = {'pubmsg': {'priority': 1, 'exclusive': True}}

    targets = (
            ('coin', 'pan'),
            ('nioc', 'nap'),
            ('\_o<', '\_x<'),
            ('>o_/', '>x_/'),
            (u'ᴎIOↃ', u'ᴎAP'),
        )

    def on_pubmsg(self, serv, ev, helper):
        pans = []
        for coin, pan in self.targets:
            for _ in xrange(helper['message'].count(coin)):
                pans.append(pan)
        if pans:
            if len(pans) < 3:
                serv.privmsg(helper['target'], ' '.join(pans))
                return True
            else:
                serv.privmsg(helper['target'], 'raaa' + 'ta' * len(pans))
                return True
{'fraction_non_alphanumeric': 0.17618040873854826, 'fraction_numerical': 0.004228329809725159, 'mean_word_length': 1.6591760299625469, 'pattern_counts': {'":': 0, '<': 8, '<?xml version=': 0, '>': 8, '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': '722224', 'n_tokens_mistral': 477, 'n_tokens_neox': 448, 'n_words': 108}