<commit_before># -*- coding: utf-8 -*-
#
# Copyright 2016 - 2018  Ternaris.
# SPDX-License-Identifier: AGPL-3.0-only

from __future__ import absolute_import, division, print_function

import os

import flask
from pkg_resources import resource_filename

from marv_webapi.tooling import api_group as marv_api_group


DOCS = os.path.join(resource_filename('marv_robotics', 'docs'))


@marv_api_group()
def robotics(app):

    @app.route('/docs', defaults={'path': 'index.html'})
    @app.route('/docs/', defaults={'path': 'index.html'})
    @app.route('/docs/<path:path>')
    def docs(path):
        return flask.send_from_directory(DOCS, path, conditional=True)<commit_msg>[robotics] Do not cache docs.<commit_after># -*- coding: utf-8 -*-
#
# Copyright 2016 - 2018  Ternaris.
# SPDX-License-Identifier: AGPL-3.0-only

from __future__ import absolute_import, division, print_function

import os

import flask
from pkg_resources import resource_filename

from marv_webapi.tooling import api_group as marv_api_group


DOCS = os.path.join(resource_filename('marv_robotics', 'docs'))


@marv_api_group()
def robotics(app):

    @app.route('/docs', defaults={'path': 'index.html'})
    @app.route('/docs/', defaults={'path': 'index.html'})
    @app.route('/docs/<path:path>')
    def docs(path):
        resp = flask.send_from_directory(DOCS, path, conditional=True)
        resp.headers['Cache-Control'] = 'no-cache'
        return resp
{'fraction_non_alphanumeric': 0.14814814814814814, 'fraction_numerical': 0.015373864430468204, 'mean_word_length': 4.528957528957529, 'pattern_counts': {'":': 0, '<': 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': '2261393', 'n_tokens_mistral': 511, 'n_tokens_neox': 479, 'n_words': 103}