<commit_before>#!/usr/bin/python3
import json
import os
import getopt

import sys, inspect




this_folder = os.path.realpath(os.path.abspath(os.path.split(inspect.getfile(inspect.currentframe()))[0]))
src_folder = os.path.realpath(os.path.abspath(os.path.join(this_folder,"..", "src")))
if src_folder not in sys.path:
    sys.path.insert(0, src_folder)

# must first init loadenv
from log import initlogging
initlogging("docklet-user")
from log import logger

import tools, env
config = env.getenv("CONFIG")
tools.loadenv(config)
masterips = env.getenv("MASTER_IPS").split(",")
G_masterips = []
for masterip in masterips:
    G_masterips.append(masterip.split("@")[0] + ":" + str(env.getenv("MASTER_PORT")))


from flask import Flask, request, session, render_template, redirect, send_from_directory, make_response, url_for, abort
from functools import wraps<commit_msg>fix a billing bug<commit_after>#!/usr/bin/python3
import json
import os
import getopt

import sys, inspect




this_folder = os.path.realpath(os.path.abspath(os.path.split(inspect.getfile(inspect.currentframe()))[0]))
src_folder = os.path.realpath(os.path.abspath(os.path.join(this_folder,"..", "src")))
if src_folder not in sys.path:
    sys.path.insert(0, src_folder)

# must first init loadenv
from log import initlogging
initlogging("docklet-user")
from log import logger

import tools, env
config = env.getenv("CONFIG")
tools.loadenv(config)
masterips = env.getenv("MASTER_IPS").split(",")
G_masterips = []
for masterip in masterips:
    G_masterips.append(masterip.split("@")[0] + ":" + str(env.getenv("MASTER_PORT")))

from flask import Flask, request, session, render_template, redirect, send_from_directory, make_response, url_for, abort
from functools import wraps
{'fraction_non_alphanumeric': 0.13868194842406878, 'fraction_numerical': 0.004584527220630372, 'mean_word_length': 6.068825910931174, 'pattern_counts': {'":': 2, '<': 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': '172588', 'n_tokens_mistral': 610, 'n_tokens_neox': 595, 'n_words': 134}