<commit_before>var http = require('http'),
	fs = require('fs'),
	yaml = require('yaml')
	_ = require('underscore'),
	nodemailer = require('nodemailer'),
	activeAlerts = [],
	isAcceptableStatus = false,
	isAlertActive = false;

// Open the config file and establish user settings.
var config = yaml.eval(fs.readFileSync('config.yaml', 'utf8').toString());

if (!config) {
	console.log("config.yaml is invalid, please check.")
}

// Initialize HTTP GET request settings.
var requestOptions = {
	'path': '/',
	'headers': {
		'user-agent': config['user-agent']
	}
};

// Configure the Mail
var mailTransport = nodemailer.createTransport("SES", {
	AWSAccessKeyID: config.ses.access,
	AWSSecretKey: config.ses.secret
});

var checkStatus = function (hostname, contact, statusCode) {
	console.log("CHECK " + hostname + " -> " + statusCode);

	isAcceptableStatus = _.indexOf(config['status-codes'], statusCode) >= 0;
	isAlertActive = _.indexOf(activeAlerts, hostname) >= 0;

	console.log(isAcceptableStatus);
	console.log(isAlertActive);

	// Send admin email alert if:
	// 1. Status code is unacceptable (not in config[status-codes])
	// 2. We haven't already notified them.
	if (!isAcceptableStatus && !isAlertActive) {
		console.log("ALERTING contact for " + hostname);

		// Send the email:
		mailTransport.sendMail({
			from: config.from,
			to: contact,
			cc: config.cc,
			subject: "DOWN alert: " + hostname + " EOM"
		});

		// Add hostname to activeAlerts[]
		activeAlerts.push(hostname);<commit_msg>Removed unnecessary console.log() calls.<commit_after>var http = require('http'),
	fs = require('fs'),
	yaml = require('yaml')
	_ = require('underscore'),
	nodemailer = require('nodemailer'),
	activeAlerts = [],
	isAcceptableStatus = false,
	isAlertActive = false;

// Open the config file and establish user settings.
var config = yaml.eval(fs.readFileSync('config.yaml', 'utf8').toString());

if (!config) {
	console.log("config.yaml is invalid, please check.")
}

// Initialize HTTP GET request settings.
var requestOptions = {
	'path': '/',
	'headers': {
		'user-agent': config['user-agent']
	}
};

// Configure the Mail
var mailTransport = nodemailer.createTransport("SES", {
	AWSAccessKeyID: config.ses.access,
	AWSSecretKey: config.ses.secret
});

var checkStatus = function (hostname, contact, statusCode) {
	console.log("CHECK " + hostname + " -> " + statusCode);

	isAcceptableStatus = _.indexOf(config['status-codes'], statusCode) >= 0;
	isAlertActive = _.indexOf(activeAlerts, hostname) >= 0;

	// Send admin email alert if:
	// 1. Status code is unacceptable (not in config[status-codes])
	// 2. We haven't already notified them.
	if (!isAcceptableStatus && !isAlertActive) {
		console.log("ALERTING contact for " + hostname);

		// Send the email:
		mailTransport.sendMail({
			from: config.from,
			to: contact,
			cc: config.cc,
			subject: "DOWN alert: " + hostname + " EOM"
		});

		// Add hostname to activeAlerts[]
		activeAlerts.push(hostname);
{'fraction_non_alphanumeric': 0.15436467812605326, 'fraction_numerical': 0.003370407819346141, 'mean_word_length': 4.347747747747747, 'pattern_counts': {'":': 0, '<': 3, '<?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': '1281056', 'n_tokens_mistral': 1004, 'n_tokens_neox': 946, 'n_words': 240}