<commit_before>"""Starts opsdroid."""

import sys
import os
import logging
import argparse

from opsdroid.core import OpsDroid
from opsdroid.helper import set_logging_level
from opsdroid.const import LOG_FILENAME


def parse_args(args):
    """Parse command line arguments."""
    parser = argparse.ArgumentParser(description='Run opsdroid.')
    parser.add_argument('--gen-config', action="store_true",
                        help='prints out an example configuration file')
    return parser.parse_args(args)


def check_dependencies():
    """Check for system dependencies required by opsdroid."""
    if sys.version_info[0] < 3 or sys.version_info[1] < 5:
        logging.critical("Whoops! opsdroid requires python 3.5 or above.")
        sys.exit(1)


def main():
    """The main function."""
    logging.basicConfig(filename=LOG_FILENAME, level=logging.INFO)
    logging.info("="*40)
    logging.info("Stated application")

    args = parse_args(sys.argv[1:])

    if args.gen_config:
        path = os.path.join(
            os.path.dirname(os.path.abspath(__file__)),
            "configuration/example_configuration.yaml")
        with open(path, 'r') as conf:
            print(conf.read())
        sys.exit(0)

    check_dependencies()

    with OpsDroid() as opsdroid:
        opsdroid.load()
        if "logging" in opsdroid.config:
            set_logging_level(opsdroid.config['logging'])
        opsdroid.start_loop()
        opsdroid.exit()

if __name__ == "__main__":
    main()<commit_msg>Added missing blank line<commit_after>"""Starts opsdroid."""

import sys
import os
import logging
import argparse

from opsdroid.core import OpsDroid
from opsdroid.helper import set_logging_level
from opsdroid.const import LOG_FILENAME


def parse_args(args):
    """Parse command line arguments."""
    parser = argparse.ArgumentParser(description='Run opsdroid.')
    parser.add_argument('--gen-config', action="store_true",
                        help='prints out an example configuration file')
    return parser.parse_args(args)


def check_dependencies():
    """Check for system dependencies required by opsdroid."""
    if sys.version_info[0] < 3 or sys.version_info[1] < 5:
        logging.critical("Whoops! opsdroid requires python 3.5 or above.")
        sys.exit(1)


def main():
    """The main function."""
    logging.basicConfig(filename=LOG_FILENAME, level=logging.INFO)
    logging.info("="*40)
    logging.info("Stated application")

    args = parse_args(sys.argv[1:])

    if args.gen_config:
        path = os.path.join(
            os.path.dirname(os.path.abspath(__file__)),
            "configuration/example_configuration.yaml")
        with open(path, 'r') as conf:
            print(conf.read())
        sys.exit(0)

    check_dependencies()

    with OpsDroid() as opsdroid:
        opsdroid.load()
        if "logging" in opsdroid.config:
            set_logging_level(opsdroid.config['logging'])
        opsdroid.start_loop()
        opsdroid.exit()


if __name__ == "__main__":
    main()
{'fraction_non_alphanumeric': 0.12013201320132014, 'fraction_numerical': 0.007260726072607261, 'mean_word_length': 3.079407806191117, 'pattern_counts': {'":': 2, '<': 7, '<?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': '6846583', 'n_tokens_mistral': 935, 'n_tokens_neox': 905, 'n_words': 214}