<commit_before>#!/usr/bin/env python

class Eizzek(object):
    
    def __init__(self, jid, password):
        self.xmpp = sleekxmpp.ClientXMPP(jid, password)    
        self._connect_handlers()
    
    def _connect_handlers(self):
        self.xmpp.add_event_handler("session_start", self.handle_session_start) 
        self.xmpp.add_event_handler("message", self.handle_message)
    
    def run(self, address=()):
        self.xmpp.connect(address)
        self.xmpp.process(threaded=False)
    
    def handle_session_start(self, event): 
        self.xmpp.sendPresence(pstatus = "Hi, I'm a bot")
    
    def handle_message(self, message): 
        self.xmpp.sendMessage(message['from'].jid, message["body"])
    


def main():
    import config
    bot = EchoBot(config.ACCOUNT, config.PASSWORD)
    bot.run((config.SERVER, config.PORT))


if __name__ == '__main__':
    main()<commit_msg>simple echo bot working<commit_after>#!/usr/bin/env python
import sleekxmpp
import config

class Eizzek(object):
    
    def __init__(self, jid, password):
        self.xmpp = sleekxmpp.ClientXMPP(jid, password)    
        self._connect_handlers()
    
    def _connect_handlers(self):
        self.xmpp.add_event_handler("session_start", self.handle_session_start) 
        self.xmpp.add_event_handler("message", self.handle_message)
    
    def run(self, address=()):
        self.xmpp.connect(address)
        self.xmpp.process(threaded=False)
    
    def handle_session_start(self, event): 
        self.xmpp.sendPresence(pstatus = "Hi, I'm a bot")
    
    def handle_message(self, message): 
        self.xmpp.sendMessage(message['from'].jid, message["body"])
    


def main():
    bot = Eizzek(config.JID, config.PASSWORD)
    bot.run((config.SERVER, config.PORT))


if __name__ == '__main__':
    main()
{'fraction_non_alphanumeric': 0.12679162072767364, 'fraction_numerical': 0.0, 'mean_word_length': 3.1063348416289593, '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': '2378325', 'n_tokens_mistral': 638, 'n_tokens_neox': 619, 'n_words': 102}