<commit_before>import os

from tornado.ioloop import IOLoop
from tornado.web import Application
from tornado.httpserver import HTTPServer

from . import handlers


class LogsterApplication(Application):
    handlers = [
        (r'/', handlers.IndexHandler),
    ]

    settings = {
        'template_path': os.path.join(
            os.path.dirname(__file__), '../templates')
    }

    def __init__(self):
        super(LogsterApplication, self).__init__(
            handlers=self.handlers,
            **self.settings
        )


def run_server():
    app = LogsterApplication()
    server = HTTPServer(app)
    server.listen(8888)

    IOLoop.current().start()<commit_msg>Use post value from config<commit_after>import os

from tornado.ioloop import IOLoop
from tornado.web import Application
from tornado.httpserver import HTTPServer

from . import handlers
from .conf import config


class LogsterApplication(Application):
    handlers = [
        (r'/', handlers.IndexHandler),
    ]

    settings = {
        'template_path': os.path.join(
            os.path.dirname(__file__), '../templates')
    }

    def __init__(self):
        super(LogsterApplication, self).__init__(
            handlers=self.handlers,
            **self.settings
        )


def run_server():
    app = LogsterApplication()
    server = HTTPServer(app)
    server.listen(config['app']['port'])

    IOLoop.current().start()
{'fraction_non_alphanumeric': 0.11142654364797729, 'fraction_numerical': 0.0028388928317956, 'mean_word_length': 2.770053475935829, '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': '5585544', 'n_tokens_mistral': 420, 'n_tokens_neox': 399, 'n_words': 89}