<commit_before><?php
/**
 * Helper class to read localmail.
 */
class Local_Mail {
	
	/** Singleton *************************************************************/
	private static $instance;
	
	private $mail;

	/**
	 * Main Instance
	 *
	 * @staticvar 	array 	$instance
	 * @return 		The one true instance
	 */
	public static function instance() {
		if ( ! isset( self::$instance ) ) {
			self::$instance = new self;
			self::$instance->init();
		}
		return self::$instance;
	}
	
	/* To infinity and beyond */
	function init() {
		$this->mail = isset( $_GET['mail'] ) ? $_GET['mail'] : '/var/mail/austinpassy';
		$this->session();
	}
	
	/** Session */
	function session() {
		
		if ( session_id() === '' ) {
			session_start();
		}
	}
	
	/** Cleared? */
	function is_cleared() {
		
		if ( isset( $_GET['clear_all'] ) && 'true' === $_GET['clear_all'] ) {
			return true;
		}
		else {
			return false;
		}
	}

	/** Redirect */
	function meta_refresh() {
		
		if ( $this->is_cleared() ) {
			$url  = @( $_SERVER["HTTPS"] != 'on' ) ? 'http://' . $_SERVER["SERVER_NAME"] : 'https://' . $_SERVER["SERVER_NAME"];
			$url .= ( $_SERVER["SERVER_PORT"] !== 80 ) ? ":" . $_SERVER["SERVER_PORT"] : "";
			echo '<meta http-equiv="refresh" content="7; url=' . $url . '">';
		}
	}

	/** HTML */
	function output() {
		$fileCleared = false;
		
		// Clear file?<commit_msg>Faster meta refresh.<commit_after><?php
/**
 * Helper class to read localmail.
 */
class Local_Mail {
	
	/** Singleton *************************************************************/
	private static $instance;
	
	private $mail;

	/**
	 * Main Instance
	 *
	 * @staticvar 	array 	$instance
	 * @return 		The one true instance
	 */
	public static function instance() {
		if ( ! isset( self::$instance ) ) {
			self::$instance = new self;
			self::$instance->init();
		}
		return self::$instance;
	}
	
	/* To infinity and beyond */
	function init() {
		$this->mail = isset( $_GET['mail'] ) ? $_GET['mail'] : '/var/mail/austinpassy';
		$this->session();
	}
	
	/** Session */
	function session() {
		
		if ( session_id() === '' ) {
			session_start();
		}
	}
	
	/** Cleared? */
	function is_cleared() {
		
		if ( isset( $_GET['clear_all'] ) && 'true' === $_GET['clear_all'] ) {
			return true;
		}
		return false;
	}

	/** Redirect */
	function meta_refresh() {
		
		if ( $this->is_cleared() ) {
			$url  = @( $_SERVER["HTTPS"] != 'on' ) ? 'http://' . $_SERVER["SERVER_NAME"] : 'https://' . $_SERVER["SERVER_NAME"];
			$url .= ( $_SERVER["SERVER_PORT"] !== 80 ) ? ":" . $_SERVER["SERVER_PORT"] : "";
			echo '<meta http-equiv="refresh" content="4; url=' . $url . '">';
		}
	}

	/** HTML */
	function output() {
		$fileCleared = false;
		
		// Clear file?
{'fraction_non_alphanumeric': 0.2512023677395486, 'fraction_numerical': 0.0022197558268590455, 'mean_word_length': 3.072289156626506, 'pattern_counts': {'":': 2, '<': 7, '<?xml version=': 0, '>': 13, 'https://': 2, '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': '2668746', 'n_tokens_mistral': 1034, 'n_tokens_neox': 920, 'n_words': 194}