<commit_before><?php
/**
 * @author Michael <<EMAIL>>
 *
 */

final class db
{
	/**
	 * PDO instance
	 * @var PDO
	 */
	private static $_instance = NULL;
	private static $_count = 0;
	private static $_connect = 0;
	private static $_rowCount = 0;

	/**
	 * Get DB instance
	 * @return PDO
	 */
	public static function getInstance()
	{
		if(self::$_instance === NULL)
		{
			try
			{
				self::$_instance = new PDO
				(
					"mysql:dbname={$_ENV['MYSQL_SCHEMA']};port={$_ENV['MYSQL_PORT']};host={$_ENV['MYSQL_HOST']}", 
					$_ENV['MYSQL_USERNAME'],
					$_ENV['MYSQL_PASSWORD'],
					array(PDO::MYSQL_ATTR_INIT_COMMAND => "SET NAMES 'utf8';")
				);
				self::$_instance->setAttribute(PDO::ATTR_CASE, PDO::CASE_LOWER);
				self::$_connect++;
			}
			catch(PDOException $e)
			{
				echo '<pre>';
				print_r($e); 
				echo '</pre>';
				die;
			}
		}
		return self::$_instance;
	}

	/**

	 * Database Query
	 *
	 * @param string $sql
	 * @param mix $args
	 * @param int $fetchmode
	 * @return PDOStatement
	 */
	private static function __query($sql, $args = array(), $fetchmode = PDO::FETCH_ASSOC)
	{
		if(self::getInstance())<commit_msg>Corrected timezone issue for checking agenda<commit_after><?php
/**
 * @author Michael <<EMAIL>>
 *
 */

final class db
{
	/**
	 * PDO instance
	 * @var PDO
	 */
	private static $_instance = NULL;
	private static $_count = 0;
	private static $_connect = 0;
	private static $_rowCount = 0;

	/**
	 * Get DB instance
	 * @return PDO
	 */
	public static function getInstance()
	{
		if(self::$_instance === NULL)
		{
			try
			{
				self::$_instance = new PDO
				(
					"mysql:dbname={$_ENV['MYSQL_SCHEMA']};port={$_ENV['MYSQL_PORT']};host={$_ENV['MYSQL_HOST']}", 
					$_ENV['MYSQL_USERNAME'],
					$_ENV['MYSQL_PASSWORD'],
					array(PDO::MYSQL_ATTR_INIT_COMMAND => "SET NAMES utf8, time_zone = '+8:00'")
				);
				self::$_instance->setAttribute(PDO::ATTR_CASE, PDO::CASE_LOWER);
				self::$_connect++;
			}
			catch(PDOException $e)
			{
				echo '<pre>';
				print_r($e); 
				echo '</pre>';
				die;
			}
		}
		return self::$_instance;
	}

	/**

	 * Database Query
	 *
	 * @param string $sql
	 * @param mix $args
	 * @param int $fetchmode
	 * @return PDOStatement
	 */
	private static function __query($sql, $args = array(), $fetchmode = PDO::FETCH_ASSOC)
	{
		if(self::getInstance())
{'fraction_non_alphanumeric': 0.1767741935483871, 'fraction_numerical': 0.004731182795698925, 'mean_word_length': 3.315398886827458, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 15, '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': '2514561', 'n_tokens_mistral': 989, 'n_tokens_neox': 841, 'n_words': 174}