<commit_before>
var csscolors = require("css-color-names");
var _ = require("underscore");
var doT = require("dot");

function Vari() {}

//Returns random integer between min and max argument
//Copied from: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/random
Vari.prototype.GetRandomInt = function(min, max) {
	 return Math.floor(Math.random() * (max - min + 1)) + min;
};

//Generates two hex colors and executes vari HTML template.
Vari.prototype.Template = function() {
	var red = this.Generate()
	var blue = this.Generate()
	var tt =	
	['<form class="vari-form">',
		'<fieldset>',
			'<p style="color:black;" id="vari">Input below what color you see this text in</p>',
			'<input type="text">',
			'<button type="submit" class="vari-button">Submit</button>',
		'</fieldset>',
	'</form>',
	'<script src="//ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script>',
	'<script>',
		'function red (){ $("#vari").css("color", "{{=it.red}}");  setTimeout(function(){ blue(); }, 15); }',
		'function blue(){ $("#vari").css("color", "{{=it.blue}}"); setTimeout(function(){ red();  }, 15); }',
		'blue()',
	'</script>'].join('\n');
	var template = doT.template(tt)
	var result = template({red: red, blue: blue});
	return result
};

//Returns random hex value without a name
Vari.prototype.Generate = function() {
	var hexcodes = _.values(csscolors);
    return hexcodes[this.GetRandomInt(1, 147)];
};
<commit_msg>color interval from 15ms to 16ms<commit_after>
var csscolors = require("css-color-names");
var _ = require("underscore");
var doT = require("dot");

function Vari() {}

//Returns random integer between min and max argument
//Copied from: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/random
Vari.prototype.GetRandomInt = function(min, max) {
	 return Math.floor(Math.random() * (max - min + 1)) + min;
};

//Generates two hex colors and executes vari HTML template.
Vari.prototype.Template = function() {
	var red = this.Generate()
	var blue = this.Generate()
	var tt =	
	['<form class="vari-form">',
		'<fieldset>',
			'<p style="color:black;" id="vari">Input below what color you see this text in</p>',
			'<input type="text">',
			'<button type="submit" class="vari-button">Submit</button>',
		'</fieldset>',
	'</form>',
	'<script src="//ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script>',
	'<script>',
		'function red (){ $("#vari").css("color", "{{=it.red}}");  setTimeout(function(){ blue(); }, 16); }',
		'function blue(){ $("#vari").css("color", "{{=it.blue}}"); setTimeout(function(){ red();  }, 16); }',
		'blue()',
	'</script>'].join('\n');
	var template = doT.template(tt)
	var result = template({red: red, blue: blue});
	return result
};

//Returns random hex value without a name
Vari.prototype.Generate = function() {
	var hexcodes = _.values(csscolors);
    return hexcodes[this.GetRandomInt(1, 147)];
};

module.exports = Vari.prototype.Template();
{'fraction_non_alphanumeric': 0.21273031825795644, 'fraction_numerical': 0.010050251256281407, 'mean_word_length': 4.742307692307692, 'pattern_counts': {'":': 0, '<': 29, '<?xml version=': 0, '>': 29, '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': '2777420', 'n_tokens_mistral': 1029, 'n_tokens_neox': 986, 'n_words': 239}