<commit_before>var request = require("request");
var q = require('q');
var parser = (new require('xml2js').Parser()).parseString;
var busBase = "http://webservices.nextbus.com/service/publicXMLFeed"
var subways = {
	red:"http://developer.mbta.com/lib/rthr/red.json",
	orange:"http://developer.mbta.com/lib/rthr/orange.json",
	blue:"http://developer.mbta.com/lib/rthr/blue.json"
};

function Cache(){
	var cache = {};
	this.check=function(code,def){
		if(code in cache){
			cache[code].then(function(a){
				def.resolve(a);
			},function(a){
				def.reject(a);
			});
			return false;
		}else{
			cache[code]=def.promise;
			setTimeout(function(){
				delete cache[code]
			},10000);
			return true;
		}
	}
}


var get$ = function(v){
	return v.$;
};
var parseDetails=function(raw){
	var route = raw.body.route[0]
	var out = route.$;
	out.directions=route.direction.map(function(v){
		var out = v.$;
		out.stops = v.stop.map(function(v){
			return v.$.tag;
		});
		return out;
	});
	out.stops = {}
	route.stop.forEach(function(v){
		out.stops[v.$.tag]=v.$;
	});
	out.paths = route.path.map(function(v){
		return v.point.map(function(v){
			return [v.$.lon,v.$.lat];
		});
	});
	return out;
}
var parsePrediction=function(raw){
	var list = [];
	raw.body.predictions.forEach(function(pred){
		var out = pred.$;
		out.directions={};
		if(!('direction' in pred)){
			return out;
		}
		pred.direction.forEach(function(v){
			out.directions[v.$.title]=v.prediction.map(get$);
		});
		list.push(out);
	});
	return list;
}
var parseLocations=function(raw){
	var fc={};
	fc.type = "FeatureCollection";
	fc.features=raw.body.vehicle.map(function(v){
		var feature = {};
		feature.type = "Feature";
		feature.properties = v.$;
		feature.geometry={
			"type": "Point",
			"coordinates": [feature.properties.lon,feature.properties.lat]
		}
		return feature;
	});
	if(raw.body.lastTime&&raw.body.lastTime.length){
		fc.properties={
			time : parseInt(raw.body.lastTime[0].$.time,10)
		};<commit_msg>floats!<commit_after>var request = require("request");
var q = require('q');
var parser = (new require('xml2js').Parser()).parseString;
var busBase = "http://webservices.nextbus.com/service/publicXMLFeed"
var subways = {
	red:"http://developer.mbta.com/lib/rthr/red.json",
	orange:"http://developer.mbta.com/lib/rthr/orange.json",
	blue:"http://developer.mbta.com/lib/rthr/blue.json"
};

function Cache(){
	var cache = {};
	this.check=function(code,def){
		if(code in cache){
			cache[code].then(function(a){
				def.resolve(a);
			},function(a){
				def.reject(a);
			});
			return false;
		}else{
			cache[code]=def.promise;
			setTimeout(function(){
				delete cache[code]
			},10000);
			return true;
		}
	}
}


var get$ = function(v){
	return v.$;
};
var parseDetails=function(raw){
	var route = raw.body.route[0]
	var out = route.$;
	out.directions=route.direction.map(function(v){
		var out = v.$;
		out.stops = v.stop.map(function(v){
			return v.$.tag;
		});
		return out;
	});
	out.stops = {}
	route.stop.forEach(function(v){
		out.stops[v.$.tag]=v.$;
	});
	out.paths = route.path.map(function(v){
		return v.point.map(function(v){
			return [v.$.lon,v.$.lat];
		});
	});
	return out;
}
var parsePrediction=function(raw){
	var list = [];
	raw.body.predictions.forEach(function(pred){
		var out = pred.$;
		out.directions={};
		if(!('direction' in pred)){
			return out;
		}
		pred.direction.forEach(function(v){
			out.directions[v.$.title]=v.prediction.map(get$);
		});
		list.push(out);
	});
	return list;
}
var parseLocations=function(raw){
	var fc={};
	fc.type = "FeatureCollection";
	fc.features=raw.body.vehicle.map(function(v){
		var feature = {};
		feature.type = "Feature";
		feature.properties = v.$;
		feature.geometry={
			"type": "Point",
			"coordinates": [parseFloat(feature.properties.lon,10),parseFloat(feature.properties.lat,10)]
		}
		return feature;
	});
	if(raw.body.lastTime&&raw.body.lastTime.length){
		fc.properties={
			time : parseInt(raw.body.lastTime[0].$.time,10)
		};
{'fraction_non_alphanumeric': 0.20215430861723446, 'fraction_numerical': 0.006012024048096192, 'mean_word_length': 4.010037641154328, 'pattern_counts': {'":': 4, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 2}, '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': '5570059', 'n_tokens_mistral': 1660, 'n_tokens_neox': 1506, 'n_words': 234}