<commit_before>/**
 * utils module
 *
 * @author <NAME>
 * @license GNU/AGPLv3
 * @see {@link https://www.gnu.org/licenses/agpl-3.0.txt|License}
 */

require! {
	winston: {Logger, transports: logger-transports}
	util: {inspect}
	path
}

revision = new Date! .get-time!

module.exports.logger = new Logger do
	transports:
		new logger-transports.Console do
			colorize: \all
			timestamp: on
		...

module.exports.get-basic-tpl-data = (cfg)-> do
	lang: \ru
	static-url: (relative-path)->
		path.join \/, cfg.STATIC_PATH, relative-path |> (+ "?v=#revision")
	inspect: (smth, opts=null)-> inspect smth, opts
	charset: \utf-8<commit_msg>fixed static path in server utils<commit_after>/**
 * utils module
 *
 * @author <NAME>
 * @license GNU/AGPLv3
 * @see {@link https://www.gnu.org/licenses/agpl-3.0.txt|License}
 */

require! {
	winston: {Logger, transports: logger-transports}
	util: {inspect}
	path
}

revision = new Date! .get-time!

module.exports.logger = new Logger do
	transports:
		new logger-transports.Console do
			colorize: \all
			timestamp: on
		...

module.exports.get-basic-tpl-data = (cfg)-> do
	lang: \ru
	static-url: (relative-path)->
		path.join \/static/, relative-path |> (+ "?v=#revision")
	inspect: (smth, opts=null)-> inspect smth, opts
	charset: \utf-8
{'fraction_non_alphanumeric': 0.1700626959247649, 'fraction_numerical': 0.006269592476489028, 'mean_word_length': 3.5444839857651247, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 13, 'https://': 2, 'lorem ipsum': 0, 'www.': 2, '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': '6047369', 'n_tokens_mistral': 495, 'n_tokens_neox': 478, 'n_words': 110}