<commit_before>var mysql = require('mysql');
var logger = require('./log');
var config = require('./config');
var Promise = require('es6-promise').Promise;
var stream = require('stream');


var skipStreaming = config.get('skipDBStreaming') || false;

// var cache = require('./cache');
// cache = cache.cache(1000);

// Using '?' and [params] means any special characters are automatically
// escaped, protecting against sql injection.
// In addition, multiple mysql statements per query are disabled by default;
// together, this sanitises the DB input.
// See https://github.com/felixge/node-mysql/blob/master/Readme.md

var backupMysql = null;
var args = {
    connectionLimit : 5,
		host     : config.get('dbhost'),
		user     : config.get('dbuser'),
		password : <PASSWORD>'),
		database : config.get('database'),
	};
//console.log('sql args: '  + JSON.stringify(args));

var pool = mysql.createPool(args);

//function connectPromise() {
//	return new Promise (function (resolve) {
//		resolve(connect());
//	});
//}

//function disconnectPromise(connection) {
//	return new Promise (function (resolve, reject) {
//		connection.end(function(err) {
//			if (typeof err === undefined || err === null) {
//				resolve();
//			}
//			else {
//				reject(err);
//			}
//
//		});
//	});
//}

<commit_msg>adding db port to config<commit_after>var mysql = require('mysql');
var logger = require('./log');
var config = require('./config');
var Promise = require('es6-promise').Promise;
var stream = require('stream');


var skipStreaming = config.get('skipDBStreaming') || false;

// var cache = require('./cache');
// cache = cache.cache(1000);

// Using '?' and [params] means any special characters are automatically
// escaped, protecting against sql injection.
// In addition, multiple mysql statements per query are disabled by default;
// together, this sanitises the DB input.
// See https://github.com/felixge/node-mysql/blob/master/Readme.md

var backupMysql = null;
var args = {
    connectionLimit : 5,
		host     : config.get('dbhost'),
		port     : config.get('dbport') || 3306,
		user     : config.get('dbuser'),
		password : <PASSWORD>('<PASSWORD>'),
		database : config.get('database'),
	};
//console.log('sql args: '  + JSON.stringify(args));

var pool = mysql.createPool(args);

//function connectPromise() {
//	return new Promise (function (resolve) {
//		resolve(connect());
//	});
//}

//function disconnectPromise(connection) {
//	return new Promise (function (resolve, reject) {
//		connection.end(function(err) {
//			if (typeof err === undefined || err === null) {
//				resolve();
//			}
//			else {
//				reject(err);
//			}
//
//		});
//	});
//}


{'fraction_non_alphanumeric': 0.18600299401197604, 'fraction_numerical': 0.005988023952095809, 'mean_word_length': 3.4328358208955225, 'pattern_counts': {'":': 0, '<': 6, '<?xml version=': 0, '>': 6, 'https://': 2, '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': '3470153', 'n_tokens_mistral': 867, 'n_tokens_neox': 823, 'n_words': 215}