<commit_before><?php

class Edge_LifetimeSalesForDashboard_Model_Report
{
    public function sendLifetimeSales()
    {
        if (!Mage::getStoreConfig('sales/lifetime_sales/enabled')){
            return;
        }

        $uid = Mage::getStoreConfig('sales/lifetime_sales/uid');
        if (!$uid){
            return;
        }

        $url = Mage::getStoreConfig('sales/lifetime_sales/url');
        if (!$url){
            return;
        }

        $username = Mage::getStoreConfig('sales/lifetime_sales/username');
        $password = Mage::getStoreConfig('sales/lifetime_sales/password');

        $data = array(
            'uid' => $uid,
            'lifetime_sales' => Mage::getResourceModel('reports/order_collection')->calculateSales()->load()->getFirstItem()->getLifetime()
        );

        $ch = curl_init();
        curl_setopt($ch, CURLOPT_URL, $url);
        curl_setopt($ch, CURLOPT_USERPWD, "$username:$password");
        curl_setopt($ch, CURLOPT_HTTPAUTH, CURLAUTH_BASIC);
        curl_setopt($ch, CURLOPT_POST, count($data));
        curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($data));
        curl_exec($ch);
        curl_close($ch);
    }
}
<commit_msg>Fix POST headers x-www-form-urlencoded<commit_after><?php

class Edge_LifetimeSalesForDashboard_Model_Report
{
    public function sendLifetimeSales()
    {
        if (!Mage::getStoreConfig('sales/lifetime_sales/enabled')){
            return;
        }

        $uid = Mage::getStoreConfig('sales/lifetime_sales/uid');
        if (!$uid){
            return;
        }

        $url = Mage::getStoreConfig('sales/lifetime_sales/url');
        if (!$url){
            return;
        }

        $username = Mage::getStoreConfig('sales/lifetime_sales/username');
        $password = Mage::getStoreConfig('sales/lifetime_sales/password');

        $data = array(
            'uid' => $uid,
            'lifetime_sales' => Mage::getResourceModel('reports/order_collection')->calculateSales()->load()->getFirstItem()->getLifetime()
        );

        $ch = curl_init();
        curl_setopt($ch, CURLOPT_URL, $url);
        curl_setopt($ch, CURLOPT_USERPWD, <PASSWORD>");
        curl_setopt($ch, CURLOPT_HTTPAUTH, CURLAUTH_BASIC);
        curl_setopt($ch, CURLOPT_POST, 1);
        curl_setopt($ch, CURLOPT_POSTFIELDS, $data);
        curl_exec($ch);
        curl_close($ch);
    }
}

{'fraction_non_alphanumeric': 0.14634146341463414, 'fraction_numerical': 0.00042052144659377626, 'mean_word_length': 2.7113884555382217, 'pattern_counts': {'":': 0, '<': 6, '<?xml version=': 0, '>': 16, 'https://': 0, 'lorem ipsum': 0, 'www.': 1, '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': '1888722', 'n_tokens_mistral': 799, 'n_tokens_neox': 735, 'n_words': 99}