<commit_before>function Sheet() {
	this.header = [];
	this.data = [];
}

Sheet.prototype.getObject = function (y, header) {
	var row = this.data[y];
	if (!row) {
		return null;
	}
	header = !header ? this.header : [].concat(header);
	var o = {};
	for (var x = 0; x < header.length; x++) {
		if (header[x] === undefined || header[x] === null) {
			continue;
		}
		o[header[x]] = row[x];
	}
	return o;
};

Sheet.parseCsv = function (s, headerIncluded, colSep, rowSep) {
	headerIncluded = !!headerIncluded;
	var isHeader = headerIncluded;
	rowSep = (rowSep || '\n').replace(/[.*+?^${}()|[\]\\]/g, '\\$&');
	colSep = (colSep || ',').replace(/[.*+?^${}()|[\]\\]/g, '\\$&');
	var re = new RegExp('(' + rowSep + ')|(' + colSep + ')|($)', 'g');
	var x = 0;
	var y = 0;
	var i = 0;
	var m, value;
	var res = new Sheet();
	
	while (i < s.length) {
		value = null;
		
		if (s[i] === colSep) {
			x++;
			i++;
			continue;
		}
		else if (s[i] === rowSep) {<commit_msg>Fix Sheet.parseCsv infinite loop :/<commit_after>function Sheet() {
	this.header = [];
	this.data = [];
}

Sheet.prototype.getObject = function (y, header) {
	var row = this.data[y];
	if (!row) {
		return null;
	}
	header = !header ? this.header : [].concat(header);
	var o = {};
	for (var x = 0; x < header.length; x++) {
		if (header[x] === undefined || header[x] === null) {
			continue;
		}
		o[header[x]] = row[x];
	}
	return o;
};

Sheet.parseCsv = function (s, headerIncluded, colSep, rowSep) {
	headerIncluded = !!headerIncluded;
	var isHeader = headerIncluded;
	rowSep = (rowSep || '\n').replace(/[.*+?^${}()|[\]\\]/g, '\\$&');
	colSep = (colSep || ',').replace(/[.*+?^${}()|[\]\\]/g, '\\$&');
	var re = new RegExp('(' + rowSep + ')|(' + colSep + ')', 'g');
	var x = 0;
	var y = 0;
	var i = 0;
	var m, value;
	var res = new Sheet();
	
	while (i < s.length) {
		value = null;
		
		if (s[i] === colSep) {
			x++;
			i++;
			continue;
		}
		else if (s[i] === rowSep) {
{'fraction_non_alphanumeric': 0.25854922279792747, 'fraction_numerical': 0.004145077720207254, 'mean_word_length': 3.0824524312896404, 'pattern_counts': {'":': 0, '<': 7, '<?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': '3466329', 'n_tokens_mistral': 853, 'n_tokens_neox': 801, 'n_words': 190}