<commit_before># -*- coding: utf-8 -*-

#
# Copyright (C) 2015-2016 <NAME> <<EMAIL>>
#


from flask import Flask, render_template, jsonify, redirect,\
    request, session, url_for
from werkzeug.serving import run_simple
from werkzeug.wsgi import DispatcherMiddleware
from werkzeug.exceptions import abort
import logging

from flask_babel import Babel, gettext
import flask_login

from libs.qpanel.upgrader import *
import libs.qpanel.utils as uqpanel

from libs.qpanel.config import QPanelConfig
from libs.qpanel.backend import Backend
from libs.qpanel.model import queuelog_data_queue


class User(flask_login.UserMixin):
    pass

cfg = QPanelConfig()
backend = Backend()


def get_data_queues(queue=None):
    data = backend.get_data_queues()
    if queue is not None:
        try:
            data = data[queue]
        except:
            abort(404)
    if cfg.is_debug:<commit_msg>fix when queue_log config is not defined<commit_after># -*- coding: utf-8 -*-

#
# Copyright (C) 2015-2016 <NAME> <<EMAIL>>
#


from flask import Flask, render_template, jsonify, redirect,\
    request, session, url_for
from werkzeug.serving import run_simple
from werkzeug.wsgi import DispatcherMiddleware
from werkzeug.exceptions import abort
import logging

from flask_babel import Babel, gettext
import flask_login

from libs.qpanel.upgrader import *
import libs.qpanel.utils as uqpanel

from libs.qpanel.config import QPanelConfig
from libs.qpanel.backend import Backend
if QPanelConfig().has_queuelog_config():
    from libs.qpanel.model import queuelog_data_queue


class User(flask_login.UserMixin):
    pass

cfg = QPanelConfig()
backend = Backend()


def get_data_queues(queue=None):
    data = backend.get_data_queues()
    if queue is not None:
        try:
            data = data[queue]
        except:
            abort(404)
    if cfg.is_debug:
{'fraction_non_alphanumeric': 0.08333333333333333, 'fraction_numerical': 0.012987012987012988, 'mean_word_length': 3.8403141361256545, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, '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': '24836', 'n_tokens_mistral': 628, 'n_tokens_neox': 599, 'n_words': 169}