<commit_before><?php
    // get hdd and kwh
    require_once 'login.php';
	$link = mysqli_connect($db_hostname, $db_username, $db_password, $db_database);

    if (mysqli_connect_errno()) {
        printf("Connect failed: %s\n", mysqli_connect_error());
        exit();
    }
	
	if (isset($_GET['base']) && isset($_GET['period']) && isset($_GET['house']) && isset($_GET['date']))
	{
		$base = get_post($link, 'base');
		$period = get_post($link, 'period');
		$house = get_post($link, 'house');
		$year = date_format(date_create( get_post($link, 'date') ), 'Y');
	} 
	else 
	{
		echo "failed"; 
	}
	
	/*
	SELECT (54.0 - t.temperature) * 1 / 24 AS 'hdd', e.ashp/1000.0, t.temperature, e.date<commit_msg>Version 4.2.1<commit_after><?php
    // get hdd and kwh
    require_once 'login.php';
	$link = mysqli_connect($db_hostname, $db_username, $db_password, $db_database);

    if (mysqli_connect_errno()) {
        printf("Connect failed: %s\n", mysqli_connect_error());
        exit();
    }
	
	if (isset($_GET['base']) && isset($_GET['period']) && isset($_GET['house']) && isset($_GET['date']))
	{
		$base = get_post($link, 'base');
		$period = get_post($link, 'period');
		$house = get_post($link, 'house');
		date_default_timezone_set('America/New_York');
		$year = date_format(date_create( get_post($link, 'date') ), 'Y');
	} 
	else 
	{
		echo "failed"; 
	}
	
	/*
	SELECT (54.0 - t.temperature) * 1 / 24 AS 'hdd', e.ashp/1000.0, t.temperature, e.date
{'fraction_non_alphanumeric': 0.20951068228807718, 'fraction_numerical': 0.01722949689869056, 'mean_word_length': 3.938775510204082, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 3, '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': '7172803', 'n_tokens_mistral': 584, 'n_tokens_neox': 544, 'n_words': 103}