<commit_before>inlist_module.directive('gdOnevarResults', function() { return {
    require:'^ngController', //input_list_ctrl
    templateUrl:'app/views/onevar_results_table.html',
    link: function(scope,elem,attrs,ctrl) {
        scope.$watch('inctrl.stats', function(stats) {
            document.getElementById('onevar_results_main').innerHTML
                = '';
            innerdivstring = '';
            keys = Object.keys(stats);
            for(i=0; i<keys.length; i++) {
                var row = document.createElement('tr');
                var detail_desc = document.createElement('td');
                detail_desc.innerHTML = (ctrl.detail_desc[keys[i]]);
                row.appendChild(detail_desc);
                var symbol_desc = document.createElement('td');
                symbol_desc.innerHTML = 
                    '<script type="math/tex">' 
                    + ctrl.symbolic_desc[keys[i]] + '</script>';
                row.appendChild(symbol_desc);
                var data = document.createElement('td');
                data.innerHTML = '<script type="math/tex">' + 
                    stats[keys[i]] + '</script>';
                row.appendChild(data);
                document.getElementById('onevar_results_main')
                    .appendChild(row);<commit_msg>Add undefined instead of nan if only one number<commit_after>inlist_module.directive('gdOnevarResults', function() { return {
    require:'^ngController', //input_list_ctrl
    templateUrl:'app/views/onevar_results_table.html',
    link: function(scope,elem,attrs,ctrl) {
        scope.$watch('inctrl.stats', function(stats) {
            document.getElementById('onevar_results_main').innerHTML
                = '';
            innerdivstring = '';
            keys = Object.keys(stats);
            for(i=0; i<keys.length; i++) {
                var row = document.createElement('tr');
                var detail_desc = document.createElement('td');
                detail_desc.innerHTML = (ctrl.detail_desc[keys[i]]);
                row.appendChild(detail_desc);
                var symbol_desc = document.createElement('td');
                symbol_desc.innerHTML = 
                    '<script type="math/tex">' 
                    + ctrl.symbolic_desc[keys[i]] + '</script>';
                row.appendChild(symbol_desc);
                var data = document.createElement('td');
                if(!stats[keys[i]] && stats[keys[i]] != 0) {
                    data.innerHTML = 'Undefined'

                } else {
                    data.innerHTML = '<script type="math/tex">' + 
                        stats[keys[i]] + '</script>';
                }
                row.appendChild(data);
                document.getElementById('onevar_results_main')
                    .appendChild(row);
{'fraction_non_alphanumeric': 0.13335704125177808, 'fraction_numerical': 0.0010668563300142249, 'mean_word_length': 1.8762781186094069, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 11, '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': '6417401', 'n_tokens_mistral': 736, 'n_tokens_neox': 695, 'n_words': 105}