<commit_before># -*- coding: utf-8 -*-
"""
    engine.py
    ~~~~~~~~~

    This module is run from the command line and triggers the start of
    a new telnet sever.

    :copyright: (c) 2012 by Mek
    :license: BSD, see LICENSE for more details.
"""

from reloader import PeriodicReloader
from twisted.internet import reactor
from server.server import Server
from configs.config import DEBUG_MODE
from configs.config import PORT
from configs.config import HOST

def run(ctx=None):
    """Entry function for Dungeon
    $ python engine.py <port>
    """
    reactor.listenTCP(PORT, Server(ctx))
    reactor.run()

if __name__ == "__main__":
    import os, json
    #world should be a cli arg
    m = os.getcwd() + "/static/maps/galaxia"
    world = json.loads(open(m, 'r').read())

    if DEBUG_MODE:
        PeriodicReloader()
    run(world)<commit_msg>Increasing readability<commit_after># -*- coding: utf-8 -*-
"""
    engine.py
    ~~~~~~~~~

    This module is run from the command line and triggers the start of
    a new telnet sever.

    :copyright: (c) 2012 by Mek
    :license: BSD, see LICENSE for more details.
"""

from reloader import PeriodicReloader
from twisted.internet import reactor
from server.server import Server as GameServer
from configs.config import DEBUG_MODE
from configs.config import PORT
from configs.config import HOST
import os, json

def run(world=None):
    """Entry function for Dungeon
    $ python engine.py <port>
    """
    reactor.listenTCP(PORT, GameServer(world))
    reactor.run()

if __name__ == "__main__":
    m = os.getcwd() + "/static/maps/galaxia"
    world = json.loads(open(m, 'r').read())

    if DEBUG_MODE:
        PeriodicReloader()
    run(world)
{'fraction_non_alphanumeric': 0.11533957845433256, 'fraction_numerical': 0.00585480093676815, 'mean_word_length': 3.2725, 'pattern_counts': {'":': 2, '<': 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': '2048846', 'n_tokens_mistral': 548, 'n_tokens_neox': 533, 'n_words': 178}