<commit_before>from django.conf import settings
from django.utils.importlib import import_module
import sys
from tornado import web, ioloop
from sockjs.tornado import SockJSRouter
from swampdragon import discover_routes, load_field_deserializers
from swampdragon.settings_provider import SettingsHandler


def run_server():
    args = sys.argv
    HOST = '127.0.0.1'
    PORT = 9999

    if len(args) > 1:
        host_port = args[1]
        HOST = host_port.split(':')[0]
        PORT = host_port.split(':')[1]
    routers = []
<commit_msg>Updated server to work with django 1.7<commit_after>import django
from django.conf import settings
from django.utils.importlib import import_module
import sys
from tornado import web, ioloop
from sockjs.tornado import SockJSRouter
from swampdragon import discover_routes, load_field_deserializers
from swampdragon.settings_provider import SettingsHandler


def run_server():
    if hasattr(django, 'setup'):
        django.setup()

    args = sys.argv
    HOST = '127.0.0.1'
    PORT = 9999

    if len(args) > 1:
        host_port = args[1]
        HOST = host_port.split(':')[0]
        PORT = host_port.split(':')[1]
    routers = []

{'fraction_non_alphanumeric': 0.0933786078098472, 'fraction_numerical': 0.025466893039049237, 'mean_word_length': 3.641732283464567, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 2, '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': '6867645', 'n_tokens_mistral': 399, 'n_tokens_neox': 372, 'n_words': 104}