<commit_before># coding=utf-8
import asyncio
import logging
import signal

import sys
from typing import Optional

from ultros.core.events import manager as event_manager
from ultros.core.networks import manager as network_manager
from ultros.core.plugins import manager as plugin_manager
from ultros.core.storage import manager as storage_manager

"""
The Ultros class - encapsulation for what matters.

This class could be considered an "instance" of a bot. It contains and manages
instances of the other internal managers - such as the event manager, network
managers, plugin manager and storage manager.

As we've moved away from our previous Singleton-bound implementation, some
way to keep track of everything became necessary. This class will be passed
around all over the place.
"""

__author__ = "<NAME>"


class Ultros:
    """
    The Ultros class. Home for all system-wide components.

    :param config_dir: Directory containing configuration files
    :param data_dir: Directory to contain data files
    :param event_loop: Optionally, the event loop to work with. Omit this and the instance will create one itself,
                       preferring `uvloop` if installed. If you don't want to use uvloop, pass in a loop yourself.
    :param handle_signals: If you don't want SIGTERM, SIGINT and SIGBREAK handled automatically (eg, you have more
                           than one Ultros instance), then set this to False.
    """

    event_manager = None
    network_manager = None
    plugin_manager = None
    storage_manager = None

    def __init__(self, config_dir: str, data_dir: str, event_loop: Optional[asyncio.BaseEventLoop]=None,
                 handle_signals: bool=True):
        self.do_stop = False<commit_msg>[Ultros] Move docstring to the correct spot<commit_after># coding=utf-8

"""
The Ultros class - encapsulation for what matters.

This class could be considered an "instance" of a bot. It contains and manages
instances of the other internal managers - such as the event manager, network
managers, plugin manager and storage manager.

As we've moved away from our previous Singleton-bound implementation, some
way to keep track of everything became necessary. This class will be passed
around all over the place.
"""

import asyncio
import logging
import signal

from typing import Optional

from ultros.core.events import manager as event_manager
from ultros.core.networks import manager as network_manager
from ultros.core.plugins import manager as plugin_manager
from ultros.core.storage import manager as storage_manager

__author__ = "<NAME>"


class Ultros:
    """
    The Ultros class. Home for all system-wide components.

    :param config_dir: Directory containing configuration files
    :param data_dir: Directory to contain data files
    :param event_loop: Optionally, the event loop to work with. Omit this and the instance will create one itself,
                       preferring `uvloop` if installed. If you don't want to use uvloop, pass in a loop yourself.
    :param handle_signals: If you don't want SIGTERM, SIGINT and SIGBREAK handled automatically (eg, you have more
                           than one Ultros instance), then set this to False.
    """

    event_manager = None
    network_manager = None
    plugin_manager = None
    storage_manager = None

    def __init__(self, config_dir: str, data_dir: str, event_loop: Optional[asyncio.BaseEventLoop]=None,
                 handle_signals: bool=True):
        self.do_stop = False
{'fraction_non_alphanumeric': 0.05476326297775243, 'fraction_numerical': 0.0005704506560182544, 'mean_word_length': 3.5783289817232378, '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': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1972707', 'n_tokens_mistral': 916, 'n_tokens_neox': 885, 'n_words': 421}