<commit_before><?php // Presto global config and constants

define('PRESTO', 'presto.php');
define('PRESTO_DEBUG', 0);
define('VERSION_HEADER', 'X-Api-Version');
define('DEFAULT_RES_TYPE', '.html');
define('PRESTO_BASE', dirname(__FILE__));
define('API_BASE', realpath($_SERVER['DOCUMENT_ROOT']));

$builtIns = array('API', 'request', 'session');

set_include_path(get_include_path()
  . PATH_SEPARATOR . PRESTO_BASE
  . PATH_SEPARATOR . API_BASE
  . PATH_SEPARATOR . API_BASE . '/lib/'
  . PATH_SEPARATOR . API_BASE . '/lib/extras/');	

class PrestoException extends Exception { 
	public static function errorHandlerCallback($code, $string, $file, $line, $context) {
	
		if (error_reporting() != 0)
			return; 
			
		$e = new self($string, $code);
		
		$e->line = $line;
		$e->file = $file;

		throw $e;
	}
} 

assert_options(ASSERT_WARNING, 0);
ini_set('html_errors',false);
error_reporting(E_ALL);
set_error_handler(array("PrestoException", "errorHandlerCallback"), E_ALL);

?><commit_msg>Added HOST default for local testing/use.<commit_after><?php // Presto global config and constants

define('PRESTO', 'presto.php');
define('PRESTO_DEBUG', 0);
define('VERSION_HEADER', 'X-Api-Version');
define('DEFAULT_RES_TYPE', '.html');
define('PRESTO_BASE', dirname(__FILE__));
define('API_BASE', realpath($_SERVER['DOCUMENT_ROOT']));
if (empty($_SERVER['HOST'])) $_SERVER['HOST'] = 'localhost';

$builtIns = array('API', 'request', 'session');

set_include_path(get_include_path()
  . PATH_SEPARATOR . PRESTO_BASE
  . PATH_SEPARATOR . API_BASE
  . PATH_SEPARATOR . API_BASE . '/lib/'
  . PATH_SEPARATOR . API_BASE . '/lib/extras/');	

class PrestoException extends Exception { 
	public static function errorHandlerCallback($code, $string, $file, $line, $context) {
	
		if (error_reporting() != 0)
			return; 
			
		$e = new self($string, $code);
		
		$e->line = $line;
		$e->file = $file;

		throw $e;
	}
} 

assert_options(ASSERT_WARNING, 0);
ini_set('html_errors',false);
error_reporting(E_ALL);
set_error_handler(array("PrestoException", "errorHandlerCallback"), E_ALL);
{'fraction_non_alphanumeric': 0.1720637989366844, 'fraction_numerical': 0.0028999516674722086, 'mean_word_length': 5.571428571428571, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 8, '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': '1724872', 'n_tokens_mistral': 764, 'n_tokens_neox': 719, 'n_words': 141}