<commit_before>var net = require('net');
var url = require('url');
var path = require('path');
var util = require('util');
var os = require('os');
var fs = require('fs');
var qs = require('querystring');
var EventEmitter = require('events').EventEmitter;
var StringDecoder = require('string_decoder').StringDecoder;
var PassThrough = require('stream').PassThrough;
var iconv = require('iconv-lite');
var zlib = require('zlib');
var PipeStream = require('pipestream');
var config = require('../../package.json');
var now = Date.now();
var slice = Array.prototype.slice;
var ASSESTS_PATH = exports.ASSESTS_PATH = path.join(__dirname, '../../assets');
var WHISTLE_PATH = process.env.WHISTLE_PATH || path.join(__dirname, '../../../');
var OLD_LOCAL_DATA_PATH = exports.OLD_LOCAL_DATA_PATH = path.join(WHISTLE_PATH, '.whistle data');
var LOCAL_DATA_PATH = exports.LOCAL_DATA_PATH = path.join(WHISTLE_PATH, config.dataDirname);

exports.WhistleTransform = require('./whistle-transform');
exports.SpeedTransform = require('./speed-transform');
exports.connectHttp = require('./connect-http');
exports.connectSocks = require('./connect-socks');
exports.connect = function(options, callback) {
	return exports[options.isSocks ? 'connectSocks' : 'connectHttp'](options, callback);
};
exports.parseReq = require('./parse-req');

exports.HTTPS_FIELD = 'x-' + config.name + '-https-' + now;
var CLIENT_IP_HEAD = exports.CLIENT_IP_HEAD = 'x-forwarded-for-' + config.name + '-' + now;

function noop() {}

exports.noop = noop;

function preventThrowOutError(socket) {
	socket.removeListener('error', noop);
	socket.on('error', noop);
}

exports.createAgent = function createAgent(config, https) {
	return new (require(https ? 'https' : 'http').Agent)(config)
					.on('free', preventThrowOutError);
};

exports.resolvePath = function(file) {
	if (!file || !(file = file.trim())) {<commit_msg>add WHISTLE_PATH<commit_after>var net = require('net');
var url = require('url');
var path = require('path');
var util = require('util');
var os = require('os');
var fs = require('fs');
var qs = require('querystring');
var EventEmitter = require('events').EventEmitter;
var StringDecoder = require('string_decoder').StringDecoder;
var PassThrough = require('stream').PassThrough;
var iconv = require('iconv-lite');
var zlib = require('zlib');
var PipeStream = require('pipestream');
var config = require('../../package.json');
var now = Date.now();
var slice = Array.prototype.slice;
var ASSESTS_PATH = exports.ASSESTS_PATH = path.join(__dirname, '../../assets');
var LOCAL_DATA_PATH = exports.LOCAL_DATA_PATH = process.env.WHISTLE_PATH || path.join(__dirname, '../../../', config.dataDirname);
var OLD_LOCAL_DATA_PATH = exports.OLD_LOCAL_DATA_PATH = path.join(LOCAL_DATA_PATH, '../.whistle data');

exports.WhistleTransform = require('./whistle-transform');
exports.SpeedTransform = require('./speed-transform');
exports.connectHttp = require('./connect-http');
exports.connectSocks = require('./connect-socks');
exports.connect = function(options, callback) {
	return exports[options.isSocks ? 'connectSocks' : 'connectHttp'](options, callback);
};
exports.parseReq = require('./parse-req');

exports.HTTPS_FIELD = 'x-' + config.name + '-https-' + now;
var CLIENT_IP_HEAD = exports.CLIENT_IP_HEAD = 'x-forwarded-for-' + config.name + '-' + now;

function noop() {}

exports.noop = noop;

function preventThrowOutError(socket) {
	socket.removeListener('error', noop);
	socket.on('error', noop);
}

exports.createAgent = function createAgent(config, https) {
	return new (require(https ? 'https' : 'http').Agent)(config)
					.on('free', preventThrowOutError);
};

exports.resolvePath = function(file) {
	if (!file || !(file = file.trim())) {
{'fraction_non_alphanumeric': 0.18015595590212422, 'fraction_numerical': 0.0, 'mean_word_length': 5.642857142857143, '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': '64050', 'n_tokens_mistral': 1185, 'n_tokens_neox': 1156, 'n_words': 246}