<commit_before>"""Provide all package executables
"""
import logging

from docopt import docopt

from hpcbench import __version__
from hpcbench.toolbox.loader import load_components


def setup_logger(verbose):
    """Prepare root logger
    :param verbose: integer greater than 0 to indicate verbosity level
    """
    level = logging.WARNING
    if verbose == 1:
        level = logging.INFO
    elif verbose > 1:
        level = logging.DEBUG
    logging.basicConfig(level=level)


def cli_common(doc, **kwargs):
    """Program initialization for all provided executables
    """
    arguments = docopt(doc, version='hpcbench ' + __version__, **kwargs)
    setup_logger(arguments['-v'])
    load_components()
    try:
        import matplotlib
    except ImportError:
        pass
    else:
        matplotlib.use('PS')
    return arguments
<commit_msg>Add date in log format<commit_after>"""Provide all package executables
"""
import logging

from docopt import docopt

from hpcbench import __version__
from hpcbench.toolbox.loader import load_components

LOGGING_FORMAT = "%(asctime)-15s:%(levelname)s:%(name)s:%(message)s"


def setup_logger(verbose):
    """Prepare root logger
    :param verbose: integer greater than 0 to indicate verbosity level
    """
    level = logging.WARNING
    if verbose == 1:
        level = logging.INFO
    elif verbose > 1:
        level = logging.DEBUG
    logging.basicConfig(level=level, format=LOGGING_FORMAT)


def cli_common(doc, **kwargs):
    """Program initialization for all provided executables
    """
    arguments = docopt(doc, version='hpcbench ' + __version__, **kwargs)
    setup_logger(arguments['-v'])
    load_components()
    try:
        import matplotlib
    except ImportError:
        pass
    else:
        matplotlib.use('PS')
    return arguments

{'fraction_non_alphanumeric': 0.09636563876651982, 'fraction_numerical': 0.004405286343612335, 'mean_word_length': 3.3995157384987893, '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': '7186833', 'n_tokens_mistral': 533, 'n_tokens_neox': 515, 'n_words': 151}