<commit_before>function MovAvg (size) {
	this.pointer = 0;
	this.buffer = [];
	this.putAndAvg = function (value) {
		this.buffer[this.pointer] = value;
		this.pointer = (this.pointer + 1) % size;
		var sum = 0;
		for (var i = 0; i < this.buffer.length; i++) {
			sum += this.buffer[i];
		}
		return sum / this.buffer.length;
	};
}<commit_msg>use array reduce<commit_after>function MovAvg (size) {
	this.pointer = 0;
	this.buffer = [];
	this.putAndAvg = function (value) {
		this.buffer[this.pointer] = value;
		this.pointer = (this.pointer + 1) % size;
		let sum = this.buffer.reduce((prev, curr) => prev + curr);
		return sum / this.buffer.length;
	};
}
{'fraction_non_alphanumeric': 0.1712538226299694, 'fraction_numerical': 0.009174311926605505, 'mean_word_length': 3.4863013698630136, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 4, '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': '6414545', 'n_tokens_mistral': 261, 'n_tokens_neox': 243, 'n_words': 56}