<commit_before><?php

# Send Javascript header 
header('Content-type: text/javascript');

# Load Config 
include_once('../../config.php');


// Include & load the variables 
// ############################

$variables	= SYS_PATH.'/core/json/variables.json';
$config		= json_decode(file_get_contents($variables));


// Include & load locales (because it's REALLY REALLY REALLY IMPORTANT TO HAVE A FULLY TRANSLATE DASHBOARD )
// #########################################################################################################

include_once(SYS_PATH.'/core/process/locales.loader.php');



// Check if there's a pokemon stat file 
// ####################################

$stats_file	= SYS_PATH.'/core/json/pokemon.stats.json';
$stats		= json_decode(file_get_contents($stats_file));


$now		= time();
$yesterday	= $now-86400;
$lastweek	= $now-604800;

$i=0;

foreach ($stats as $data) {
	if ($data->timestamp > $lastweek) {
		$labels_global[]	= '"'.date('D H:i', $data->timestamp).'"';
		$total[]		= $data->pokemon_now;
	}
	
	if ($data->timestamp > $yesterday) {
		$labels[] = '"'.date('H:i', $data->timestamp).'"';

		$veryCommonLocale = $locales->VERYCOMMON;
		$commonLocale = $locales->COMMON;
		$rareLocale = $locales->RARE;
		$mythicLocale = $locales->MYTHIC;

		if (!empty($data->rarity_spawn->$veryCommonLocale)) {
			$veco[]		= $data->rarity_spawn->$veryCommonLocale;
		} else {
			$veco[]		= 0;
		}
		
	
		if (!empty($data->rarity_spawn->$commonLocale)) {
			$commo[]	= $data->rarity_spawn->$commonLocale;
		} else {
			$commo[]	= 0;
		}
		
	
		if (!empty($data->rarity_spawn->$rareLocale)) {
			$rare[]		= $data->rarity_spawn->$rareLocale;
		} else {
			$rare[]		= 0;
		}
		
	
		if (!empty($data->rarity_spawn->$mythicLocale)) {
			$myth[]		= $data->rarity_spawn->$mythicLocale;
		} else {
			$myth[]		= 0;<commit_msg>Revert "Fixed the canvas data for VERYCOMMON, COMMON, RARE and MYTHIC pokemons (#126)"<commit_after><?php

# Send Javascript header 
header('Content-type: text/javascript');

# Load Config 
include_once('../../config.php');


// Include & load the variables 
// ############################

$variables	= SYS_PATH.'/core/json/variables.json';
$config		= json_decode(file_get_contents($variables));


// Include & load locales (because it's REALLY REALLY REALLY IMPORTANT TO HAVE A FULLY TRANSLATE DASHBOARD )
// #########################################################################################################

include_once(SYS_PATH.'/core/process/locales.loader.php');



// Check if there's a pokemon stat file 
// ####################################

$stats_file	= SYS_PATH.'/core/json/pokemon.stats.json';
$stats		= json_decode(file_get_contents($stats_file));


$now		= time();
$yesterday	= $now-86400;
$lastweek	= $now-604800;

$i=0;

foreach ($stats as $data) {
	if ($data->timestamp > $lastweek) {
		$labels_global[]	= '"'.date('D H:i', $data->timestamp).'"';
		$total[]		= $data->pokemon_now;
	}
	
	if($data->timestamp > $yesterday){
		
		$labels[] = '"'.date('H:i', $data->timestamp ).'"'; 
		

		if(!empty($data->rarity_spawn->{'Very common'})){
			$veco[]		= $data->rarity_spawn->{'Very common'};
		}
		else{
			$veco[]		= 0; 
		}
		
	
		if(!empty($data->rarity_spawn->Common)){
			$commo[]	= $data->rarity_spawn->Common;
		}
		else{
			$commo[]	= 0; 
		}
		
	
		if(!empty($data->rarity_spawn->Mythic)){
			$rare[]		= $data->rarity_spawn->Rare;
		}
		else{
			$rare[]		= 0; 
		}
		
	
		if(!empty($data->rarity_spawn->Mythic)){
			$myth[]		= $data->rarity_spawn->Mythic;
{'fraction_non_alphanumeric': 0.2775255391600454, 'fraction_numerical': 0.009648127128263337, 'mean_word_length': 4.276946107784431, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 53, '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': '2737296', 'n_tokens_mistral': 1458, 'n_tokens_neox': 1290, 'n_words': 209}