<commit_before><?php

// dummy class for the autoloader
namespace Aoloe {
    class Debug {
        public static function show($label, $value = null ) {
            Aoloe\debug($label, $value);
        }
    }
}

error_reporting(E_ALL);
ini_set('display_errors', '1');

if (is_null($debug_log)) {
    $debug_log = false;
}

function debug($label, $value = null) {
    global $debug_log;
    if ($debug_log) {
        if (isset($value) && (is_array($value) || is_object($value)))
        {
            echo("<script>console.log('$label: ".json_encode($value)."');</script>");
        } else {
            if (is_null($value)) {
                $value = "<null>";
            } elseif ($value === false) {
                $value = "<false>";
            }
            echo("<script>console.log('$label: ".$value."');</script>");
        }
    } else {
        if (is_null($value)) {
            $value = "<null>";
        } elseif ($value === false) {
            $value = "<false>";
        } else {
            $value = print_r($value, 1);
        }
            echo("<pre>$label:\n".htmlentities($value)."</pre>");
    }
}
<commit_msg>correctly define the namespace<commit_after><?php

namespace Aoloe;

class Debug {
    public static function show($label, $value = null ) {
        Aoloe\debug($label, $value);
    }
}

error_reporting(E_ALL);
ini_set('display_errors', '1');

if (!isset($debug_log)) {
    $debug_log = false;
}

function debug($label, $value = null) {
    global $debug_log;
    if ($debug_log) {
        if (isset($value) && (is_array($value) || is_object($value)))
        {
            echo("<script>console.log('$label: ".json_encode($value)."');</script>");
        } else {
            if (is_null($value)) {
                $value = "<null>";
            } elseif ($value === false) {
                $value = "<false>";
            }
            echo("<script>console.log('$label: ".$value."');</script>");
        }
    } else {
        if (is_null($value)) {
            $value = "<null>";
        } elseif ($value === false) {
            $value = "<false>";
        } else {
            $value = print_r($value, 1);
        }
            echo("<pre>$label:\n".htmlentities($value)."</pre>");
    }
}
{'fraction_non_alphanumeric': 0.1961486789072996, 'fraction_numerical': 0.0017913121361397223, 'mean_word_length': 1.9866310160427807, 'pattern_counts': {'":': 0, '<': 25, '<?xml version=': 0, '>': 23, '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': '1916919', 'n_tokens_mistral': 707, 'n_tokens_neox': 700, 'n_words': 130}