<commit_before>/**
 * pad with zeros
 * @author sarkiroka on 2017.01.13.
 */
var padInteger=require('./pad-integer');
var padFloat=require('./pad-float');
module.exports = function (a, b) {
	var dotPositionA = a.indexOf('.');
	var dotPositionB = a.indexOf('.');
	var numbers,resultA,resultB,retValue;
	if(dotPositionA==-1 && dotPositionB==-1){ // all integer
		numbers=Math.max(a.length, b.length);
		resultA=padInteger(a, numbers);
		resultB=padInteger(b, numbers);
		retValue={
			length: numbers,
			a: resultA,
			b: resultB
		};
	} else if(dotPositionA>-1 && dotPositionB>-1){ // all float
		numbers=Math.max(a.length, b.length);
		resultA=padFloat(a,numbers);
		resultB=padFloat(b,numbers);
		retValue={
			length:numbers,
			a:resultA,
			b:resultB
		}
	}else{
		if(dotPositionA==-1){
			a+='.0';
		}
		if(dotPositionB==-1){
			b+='.0';
		}
		dotPositionA = a.indexOf('.');
		dotPositionB = a.indexOf('.');
		numbers=Math.max(dotPositionA,dotPositionB);
		resultA=padInteger(a,numbers);
		resultB=padInteger(b,numbers);
		numbers=Math.max(resultA.length,resultB.length);
		resultA=padFloat(a,numbers);
		resultB=padFloat(b,numbers);
		retValue={
			length:numbers,
			a:resultA,
			b:resultB
		}
	}
	return retValue;
};<commit_msg>fractions<commit_after>/**
 * pad with zeros
 * @author sarkiroka on 2017.01.13.
 */
var padInteger=require('./pad-integer');
var padFloat=require('./pad-float');
module.exports = function (a, b) {
	var dotPositionA = a.indexOf('.');
	var dotPositionB = a.indexOf('.');
	var numbers,resultA,resultB,retValue;
	if(dotPositionA==-1 && dotPositionB==-1){ // all integer
		numbers=Math.max(a.length, b.length);
		resultA=padInteger(a, numbers);
		resultB=padInteger(b, numbers);
		retValue={
			length: numbers,
			a: resultA,
			b: resultB
		};
	} else if(dotPositionA>-1 && dotPositionB>-1){ // all float
		numbers=Math.max(a.length, b.length);
		resultA=padFloat(a,numbers);
		resultB=padFloat(b,numbers);
		retValue={
			length:numbers,
			a:resultA,
			b:resultB
		}
	}else{
		if(dotPositionA==-1){
			a+='.0';
		}
		if(dotPositionB==-1){
			b+='.0';
		}
		dotPositionA = a.indexOf('.');
		dotPositionB = a.indexOf('.');
		numbers=Math.max(dotPositionA,dotPositionB);
		resultA=padInteger(a,numbers);
		resultB=padInteger(b,numbers);
		numbers=Math.max(resultA.length,resultB.length);
		resultA=padFloat(resultA,numbers);
		resultB=padFloat(resultB,numbers);
		retValue={
			length:numbers,
			a:resultA,
			b:resultB
		}
	}
	return retValue;
};
{'fraction_non_alphanumeric': 0.1819645732689211, 'fraction_numerical': 0.01288244766505636, 'mean_word_length': 4.413943355119826, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, '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': '617777', 'n_tokens_mistral': 1079, 'n_tokens_neox': 951, 'n_words': 150}