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

import re
import select
import socket
import ssl
import time
import traceback

import pycurl

from threading import Thread

from module.Api import PackageDoesNotExists, FileDoesNotExists
from module.plugins.internal.Notifier import Notifier
from module.plugins.internal.misc import format_size


class IRC(Thread, Notifier):
    __name__    = "IRC"
    __type__    = "hook"
    __version__ = "0.21"
    __status__  = "testing"

    __config__ = [("activated", "bool", "Activated"                                    , False                    ),
                  ("host"     , "str" , "IRC-Server Address"                           , "Enter your server here!"),
                  ("port"     , "int" , "IRC-Server Port"                              , 6667                     ),
                  ("ident"    , "str" , "Clients ident"                                , "pyload-irc"             ),
                  ("realname" , "str" , "Realname"                                     , "pyload-irc"             ),
                  ("ssl"      , "bool", "Use SSL"                                      , False                    ),
                  ("nick"     , "str" , "Nickname the Client will take"                , "pyLoad-IRC"             ),
                  ("owner"    , "str" , "Nickname the Client will accept commands from", "Enter your nick here!"  ),
                  ("info_file", "bool", "Inform about every file finished"             , False                    ),
                  ("info_pack", "bool", "Inform about every package finished"          , True                     ),
                  ("captcha"  , "bool", "Send captcha requests"                        , True                     )]

    __description__ = """Connect to irc and let owner perform different tasks"""
    __license__     = "GPLv3"
    __authors__     = [("Jeix", "<EMAIL>")]


    def __init__(self, *args, **kwargs):
        Thread.__init__(self)
        Addon.__init__(self, *args, **kwargs)
        self.setDaemon(True)


    def activate(self):
        self.abort = False
        self.more = []
        self.new_package = {}

        self.start()


    def package_finished(self, pypack):
        try:<commit_msg>[IRC] Update<commit_after># -*- coding: utf-8 -*-

import re
import select
import socket
import ssl
import time
import traceback

import pycurl

from threading import Thread

from module.Api import PackageDoesNotExists, FileDoesNotExists
from module.plugins.internal.Notifier import Notifier
from module.plugins.internal.misc import format_size


class IRC(Thread, Notifier):
    __name__    = "IRC"
    __type__    = "hook"
    __version__ = "0.22"
    __status__  = "testing"

    __config__ = [("activated", "bool", "Activated"                                    , False                    ),
                  ("host"     , "str" , "IRC-Server Address"                           , "Enter your server here!"),
                  ("port"     , "int" , "IRC-Server Port"                              , 6667                     ),
                  ("ident"    , "str" , "Clients ident"                                , "pyload-irc"             ),
                  ("realname" , "str" , "Realname"                                     , "pyload-irc"             ),
                  ("ssl"      , "bool", "Use SSL"                                      , False                    ),
                  ("nick"     , "str" , "Nickname the Client will take"                , "pyLoad-IRC"             ),
                  ("owner"    , "str" , "Nickname the Client will accept commands from", "Enter your nick here!"  ),
                  ("info_file", "bool", "Inform about every file finished"             , False                    ),
                  ("info_pack", "bool", "Inform about every package finished"          , True                     ),
                  ("captcha"  , "bool", "Send captcha requests"                        , True                     )]

    __description__ = """Connect to irc and let owner perform different tasks"""
    __license__     = "GPLv3"
    __authors__     = [("Jeix", "<EMAIL>")]


    def __init__(self, *args, **kwargs):
        Thread.__init__(self)
        Notifier.__init__(self, *args, **kwargs)
        self.setDaemon(True)


    def activate(self):
        self.abort = False
        self.more = []
        self.new_package = {}

        self.start()


    def package_finished(self, pypack):
        try:
{'fraction_non_alphanumeric': 0.1126885536823425, 'fraction_numerical': 0.003992901508429458, 'mean_word_length': 1.3052147239263803, 'pattern_counts': {'":': 0, '<': 5, '<?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': 14, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1752966', 'n_tokens_mistral': 1231, 'n_tokens_neox': 1141, 'n_words': 310}