<commit_before>
var ejax = ejax || {}

ejax.get = function(spec){
	var url = spec.url;
	var xhr = new XMLHttpRequest();
	return {

		send: function(callback){
				xhr.open('get', url);
				//xhr.
				xhr.addEventListener('load',function(e){
					callback(xhr.responseText);
				});
				xhr.send();
		}
	}
}

ejax.post = function(spec){
	var url = spec.url;
	var body = spec.body;
	var xhr = new XMLHttpRequest();
	return {
		send: function(callback){
				xhr.open('post', url);
				xhr.setRequestHeader('Content-Type', 'application/json');
				xhr.addEventListener('load',function(e){
					callback(xhr.responseText);
				});
				xhr.send(JSON.stringify(body));
		}
	}
}

ejax.del = function(spec){
	var url = spec.url;
	var xhr = new XMLHttpRequest();
	return {
		send: function(callback){
				xhr.open('delete', url);
				xhr.setRequestHeader('Content-Type', 'application/json');
				xhr.addEventListener('load',function(e){
					callback(xhr.responseText);
				});
				xhr.send();
		}
	}
}

ejax.put = function(spec){
	var url = spec.url;
	var body = spec.body;
	var xhr = new XMLHttpRequest();
	return {
		send: function(callback){
				xhr.open('put', url);
				xhr.setRequestHeader('Content-Type', 'application/json');
				xhr.addEventListener('load',function(e){
					callback(xhr.responseText);
				});
				xhr.send(JSON.stringify(body));
		}
	}
}
<commit_msg>added parsing of data coming bacl<commit_after>
var ejax = ejax || {}

ejax.get = function(spec){
	var url = spec.url;
	var xhr = new XMLHttpRequest();
	return {

		send: function(callback){
				xhr.open('get', url);
				//xhr.
				xhr.addEventListener('load',function(e){
					callback(JSON.parse(xhr.responseText));
				});
				xhr.send();
		}
	}
}

ejax.post = function(spec){
	var url = spec.url;
	var body = spec.body;
	var xhr = new XMLHttpRequest();
	return {
		send: function(callback){
				xhr.open('post', url);
				xhr.setRequestHeader('Content-Type', 'application/json');
				xhr.addEventListener('load',function(e){
					callback(JSON.parse(xhr.responseText)JSON.parse(xhr.responseText));
				});
				xhr.send(JSON.stringify(body));
		}
	}
}

ejax.del = function(spec){
	var url = spec.url;
	var xhr = new XMLHttpRequest();
	return {
		send: function(callback){
				xhr.open('delete', url);
				xhr.setRequestHeader('Content-Type', 'application/json');
				xhr.addEventListener('load',function(e){
					callback(JSON.parse(xhr.responseText));
				});
				xhr.send();
		}
	}
}

ejax.put = function(spec){
	var url = spec.url;
	var body = spec.body;
	var xhr = new XMLHttpRequest();
	return {
		send: function(callback){
				xhr.open('put', url);
				xhr.setRequestHeader('Content-Type', 'application/json');
				xhr.addEventListener('load',function(e){
					callback(JSON.parse(xhr.responseText));
				});
				xhr.send(JSON.stringify(body));
		}
	}
}

{'fraction_non_alphanumeric': 0.17526501766784452, 'fraction_numerical': 0.0, 'mean_word_length': 3.6107491856677525, 'pattern_counts': {'":': 0, '<': 3, '<?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': '2532155', 'n_tokens_mistral': 1180, 'n_tokens_neox': 1008, 'n_words': 175}