<commit_before>#!/usr/bin/env python
"""
MaaS: Millipede as a Service
"""

from flask import Flask

from modules.mod_millipede import millipede_mod


API_VERSION = '0.0.1'

app = Flask(__name__)
app.config['API_PREFIX'] = '/api'
app.config['API_VERSION'] = API_VERSION

def make_module_prefix(mod_name):
    """
    Generate the API path for route subscription
    """
    return '{}/{}/{}'.format(app.config['API_PREFIX'],
                             app.config['API_VERSION'],
                             mod_name)
<commit_msg>Runnable both as a module or a file<commit_after>#!/usr/bin/env python
"""
MaaS: Millipede as a Service
"""

import sys
import os.path
sys.path.append(os.path.dirname(os.path.realpath(__file__)))

from flask import Flask

from modules.mod_millipede import millipede_mod


API_VERSION = '0.0.1'

app = Flask(__name__)
app.config['API_PREFIX'] = '/api'
app.config['API_VERSION'] = API_VERSION

def make_module_prefix(mod_name):
    """
    Generate the API path for route subscription
    """
    return '{}/{}/{}'.format(app.config['API_PREFIX'],
                             app.config['API_VERSION'],
                             mod_name)

{'fraction_non_alphanumeric': 0.1356655290102389, 'fraction_numerical': 0.005119453924914676, 'mean_word_length': 2.9494949494949494, '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': '3988531', 'n_tokens_mistral': 384, 'n_tokens_neox': 376, 'n_words': 84}