<commit_before><?php
date_default_timezone_set('UTC');

include("../../include/cow.php");
include("../../include/database.inc.php");


echo "WFO,AREA_V,SIZE_R\n";
//while (list($key,$val) = each($wfos)){
 $cow = new Cow(pg_connect("dbname=postgis host=localhost port=5555 user=nobody") );
 $cow->setLimitTime( mktime(6,0,0,10,1,2007),  mktime(0,0,0,5,23,2016) );
 $cow->setHailSize(0.75);
 $cow->setLimitType( Array("TO") );
 $cow->setLimitLSRType( Array("TO") );
 $cow->setLimitWFO( Array("IND") );
 $cow->milk();

 echo sprintf("%s,%.1f,%.1f\n", $key, $cow->computeAreaVerify(),
	$cow->computeSizeReduction() );
 echo $cow->computeAveragePerimeterRatio();
 echo "\n";
 echo $cow->computePOD();
 echo "\n";
 echo $cow->computeFAR();
 echo "\n";
 echo $cow->computeCSI();
 echo "\n";
 echo $cow->computeSharedBorder();
 echo "\n";
 echo $cow->computeAverageSize();
 echo "\n";
 //}

?><commit_msg>update offline script for local use<commit_after><?php
date_default_timezone_set('UTC');

include("../../include/cow.php");
include("../../include/database.inc.php");
include_once "../../include/network.php";

$nt = new NetworkTable("WFO");


echo "WFO,AREA_V,SIZE_R\n";
while (list($key,$val) = each($nt->table)){
 $cow = new Cow(pg_connect("dbname=postgis host=localhost port=5555 user=nobody") );
 $cow->setLimitTime( mktime(6,0,0,1,1,2008),  mktime(6,0,0,12,31,2010) );
 $cow->setHailSize(0.75);
 $cow->setLimitType( Array("TO") );
 $cow->setLimitLSRType( Array("TO") );
 $cow->setLimitWFO( Array($key) );
 $cow->milk();

 echo sprintf("%s,%.1f,%.1f,", $key, $cow->computeAreaVerify(),
	$cow->computeSizeReduction() );
 echo $cow->computeAveragePerimeterRatio();
 echo ",";
 echo $cow->computePOD();
 echo ",";
 echo $cow->computeFAR();
 echo ",";
 echo $cow->computeCSI();
 echo ",";
 echo $cow->computeSharedBorder();
 echo ",";
 echo $cow->computeAverageSize();
 echo ",";
 echo $cow->computeWarningsVerified();
 echo ",";
 echo $cow->computeWarnedEvents();
 echo ",";
 echo $cow->computeUnwarnedEvents();
 echo ",";
 echo $cow->computeWarningsUnverified();
 echo "\n";
}

?>
{'fraction_non_alphanumeric': 0.24386724386724387, 'fraction_numerical': 0.027898027898027897, 'mean_word_length': 5.603174603174603, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 38, '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': '479562', 'n_tokens_mistral': 790, 'n_tokens_neox': 799, 'n_words': 127}