<commit_before><?php  
//Set Time Zone to New York because MBTA is in this Time Zone :)
date_default_timezone_set("America/New_York");
$date_format = "g:i a";		//format for displaying time hour:minutes am/pm
// get the curl resource oject
$ch = curl_init();
/* Set Array Options :
   		Set return transfer to true so it returns the json object 
	 	Set the Url of the request
*/
curl_setopt_array($ch,  array(
	CURLOPT_RETURNTRANSFER => 1, 
	CURLOPT_URL => 'http://realtime.mbta.com/developer/api/v2/predictionsbyroute?api_key=wX9NwuHnZU2ToO7GmGR9uw&route=CR-Providence&format=json' ));
// execute the request and store json object in variable result
$result = curl_exec($ch);
$result = json_decode($result);
// var_dump($result);
// var_dump($result->direction[1]);
// var_dump($inbound);
// var_dump($result);

//Loop through data find all outbound trains and print out what stops they arrive it
foreach ($result->direction[0]->trip as $trip) {
	// echo "this is the ", $trip->trip_id, "trip ", " and the train id is ", $trip->vehicle->vehicle_id , "\n";
	foreach ($trip->stop as $stop) {
		// if ($stop->stop_id == "Providence"){
			echo $trip->vehicle->vehicle_id, " will arrive at stop ", $stop->stop_id ," at ", date($date_format,$stop->sch_arr_dt) , "\n";
		// }
	}
	// var_dump($trip);
	// echo "------------------------------------------\n---------------------------\n-=--------------------\n";
}
// close the resource
curl_close($ch);

?><commit_msg>Cleaned up code slightly and changed som varibales next step make it a dynamic method<commit_after><?php  
//Set Time Zone to New York because MBTA is in this Time Zone :)
date_default_timezone_set("America/New_York");
$date_format = "g:i a";		//format for displaying time hour:minutes am/pm
// get the curl resource oject
$ch = curl_init();
/* Set Array Options :
   		Set return transfer to true so it returns the json object 
	 	Set the Url of the request
*/
curl_setopt_array($ch,  array(
	CURLOPT_RETURNTRANSFER => 1, 
	CURLOPT_URL => 'http://realtime.mbta.com/developer/api/v2/predictionsbyroute?api_key=wX9NwuHnZU2ToO7GmGR9uw&route=CR-Providence&format=json' ));
// execute the request and store json object in variable result
$result = curl_exec($ch);
$result = json_decode($result);
// var_dump($result);

//Loop through data find all outbound trains and print out what stops they arrive
foreach ($result->direction[0]->trip as $trip) {
	echo "this is the ", $trip->trip_id, "trip ", " and the train id is ", $trip->vehicle->vehicle_id , "\n";
	foreach ($trip->stop as $stop) {
		// if ($stop->stop_id == "Providence"){
			echo $trip->vehicle->vehicle_id, " will arrive at stop ", $stop->stop_name ," at ", date($date_format,$stop->sch_arr_dt) , "\n";
		// }
	}
	// var_dump($trip);
	// echo "------------------------------------------\n---------------------------\n-=--------------------\n";
}
// close the resource
curl_close($ch);

?>
{'fraction_non_alphanumeric': 0.20654044750430292, 'fraction_numerical': 0.0051635111876075735, 'mean_word_length': 3.163323782234957, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 32, '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': '1739910', 'n_tokens_mistral': 985, 'n_tokens_neox': 926, 'n_words': 272}