<commit_before><?php

mb_internal_encoding("UTF-8");

// lat & long lead to 23 Ferguson St., Picton, Ontario, Canada
$lat=44.0044;
$lon=-77.1453;

// Dark Sky API key somewhere safe
$key=getenv('DARK_SKY_KEY');

$url="https://api.darksky.net/forecast/";

// we're not working with the minute-by-minute forecast
// we don't need the weatherstation flags
$exc="?exclude=minutely,flags";

$opt="&units=uk2";

// build a custom url
$dkSky=$url . $key . "/" . $lat . "," . $lon . $exc .  $opt;  
//echo  $dkSky;
//return true;


// download the forecast
$dkSky=file_get_contents($dkSky);

// write it locally
$fp=fopen("dkSky.json", "w");
fwrite($fp, $dkSky);
// tidy up
fclose($fp);



<commit_msg>tidying & comments<commit_after><?php

mb_internal_encoding("UTF-8");

// lat & long lead for Ferguson St., Picton, Ontario, Canada
$lat=44.0044;
$lon=-77.1453;

// Dark Sky API key somewhere safe
$key=getenv('DARK_SKY_KEY');
$url="https://api.darksky.net/forecast/";

// we're not (yet) working with the minute-by-minute forecast
// we don't need the weatherstation flags
$exc="?exclude=minutely,flags";
$opt="&units=uk2"; //windspeed in MPH

// build a custom url
$dkSky=$url . $key . "/" . $lat . "," . $lon . $exc .  $opt;  
/*
//debugging url
echo  $dkSky;
return true;
*/

// download the forecast
$dkSky=file_get_contents($dkSky);

// write it locally
$fp=fopen("dkSky.json", "w");
fwrite($fp, $dkSky);
// tidy up
fclose($fp);




{'fraction_non_alphanumeric': 0.19357092941998602, 'fraction_numerical': 0.020964360587002098, 'mean_word_length': 3.887372013651877, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 3, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4456605', 'n_tokens_mistral': 583, 'n_tokens_neox': 537, 'n_words': 136}