<commit_before><div  class='ttc-program-stats-inside'>
<?php
$this->Js->get('document')->event(
    'ready',
    'loadProgramStatsInsideProgram();             
    ');

echo '<span id="programstats" style="font-weight: bold">';
echo '</span>';
if ($creditStatus['manager']['status'] != 'none') {    
    echo '<span class="stat" title="Credit Remaining/Total">';
    echo '<img src="/img/credit-icon-16.png" height="13px" width="14px"> ';
    $creditUsed     = $creditStatus['count'];
    $totalCreditSet = $programDetails['settings']['credit-number'];
    $creditLeft     = $totalCreditSet - $creditUsed;
    $now = new DateTime('now');
    date_timezone_set($now,timezone_open($programDetails['settings']['timezone']));
    $programTimeNow = strtotime($now->format("Y-m-d"));
    $creditEndDate  = strtotime($programDetails['settings']['credit-to-date']);
    $timeLeft       = $creditEndDate - $programTimeNow;
    $daysToDeadLine = $timeLeft/(60*60*24);
    if($daysToDeadLine < 7) {
        echo '<span style="font-weight: bold">'.$creditLeft.'/'. $totalCreditSet.' '.$daysToDeadLine.'</span> day(s) left';
        
    } else {
        $creditEndDateSet = date('Y-m-d', $creditEndDate);
        echo '<span style="font-weight: bold">'.$creditLeft.'/'. $totalCreditSet.'</span> Until <span style="font-weight: bold">'.$creditEndDateSet.'</span>';
    }
    echo '</span>';
}
?>
</div><commit_msg>added ajaxloading spinner<commit_after><div  class='ttc-program-stats-inside'>
<?php
$this->Js->get('document')->event(
    'ready',
    'loadProgramStatsInsideProgram();             
    ');

echo '<span id="programstats" style="font-weight: bold">';
echo '<img src="/img/ajax-loader.gif">';
echo '</span>';
if ($creditStatus['manager']['status'] != 'none') {    
    echo '<span class="stat" title="Credit Remaining/Total">';
    echo '<img src="/img/credit-icon-16.png" height="13px" width="14px"> ';
    $creditUsed     = $creditStatus['count'];
    $totalCreditSet = $programDetails['settings']['credit-number'];
    $creditLeft     = $totalCreditSet - $creditUsed;
    $now = new DateTime('now');
    date_timezone_set($now,timezone_open($programDetails['settings']['timezone']));
    $programTimeNow = strtotime($now->format("Y-m-d"));
    $creditEndDate  = strtotime($programDetails['settings']['credit-to-date']);
    $timeLeft       = $creditEndDate - $programTimeNow;
    $daysToDeadLine = $timeLeft/(60*60*24);
    if($daysToDeadLine < 7) {
        echo '<span style="font-weight: bold">'.$creditLeft.'/'. $totalCreditSet.' '.$daysToDeadLine.'</span> day(s) left';
        
    } else {
        $creditEndDateSet = date('Y-m-d', $creditEndDate);
        echo '<span style="font-weight: bold">'.$creditLeft.'/'. $totalCreditSet.'</span> Until <span style="font-weight: bold">'.$creditEndDateSet.'</span>';
    }
    echo '</span>';
}
?>
</div>
{'fraction_non_alphanumeric': 0.21225919439579685, 'fraction_numerical': 0.009106830122591943, 'mean_word_length': 4.028169014084507, 'pattern_counts': {'":': 0, '<': 34, '<?xml version=': 0, '>': 40, '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': '118141', 'n_tokens_mistral': 970, 'n_tokens_neox': 914, 'n_words': 148}