<commit_before>(function () {
    'use strict';
    $(document).ready(initUI);
    function initUI() {
        getData();
    }
    function getData() {
        $.ajax({
            url: "/data",
            method: "GET",
            success: function (data) {
                renderData(data);
            },
            error: function (err) {
                alert('Unable to get data');
            }
        });
    }
    function renderData(data) {
        /* sample data
    
    data
    :
    Array[6]
    origin
    :
    "http://stackoverflow.com/questions/26079611/node-js-typeerror-path-must-be-absolute-or-specify-root-to-res-sendfile-failed"
    readType
    :
    "IMG"
    __proto__
    :
    Object
    <div class="container">
            <h4>Images</h4>
            <button type="button" class="btn btn-info" data-toggle="collapse" data-target="#demo">ORIGIN :: www.google.com</button>
            <div id="demo" class="collapse">
               
            </div>
        </div>
    */
     $("#logs").empty();
        for (var i = 0; i < data.length; i++) {
            var readType = data[i].readType=="IMG"?"Images":"Flipkart"
            var eleConatiner = $('<div class="container"></div>');
            var h4 = $('<h4 class="bold"><b>' + readType + '</b></h4>');
            eleConatiner.append(h4);
            var btn = $('<button type="button" class="btn btn-info" data-toggle="collapse" data-target="#data' + i + ' "+>ORIGIN :: ' + data[i].origin + '</button>')
            eleConatiner.append(btn);
            var text = $('<div id="data' + i + '" class="collapse">' + data[i].data.join() + '</div>')
            eleConatiner.append(text);
            $("#logs").append(eleConatiner)
        }



    }
})();<commit_msg>showing link to fetched images<commit_after>(function () {
    'use strict';
    $(document).ready(initUI);
    function initUI() {
        getData();
    }
    function getData() {
        $.ajax({
            url: "/data",
            method: "GET",
            success: function (data) {
                renderData(data);
            },
            error: function (err) {
                alert('Unable to get data');
            }
        });
    }
    function renderData(data) {
        /* sample data
        
        data
        :
        Array[6]
        origin
        :
        "http://stackoverflow.com/questions/26079611/node-js-typeerror-path-must-be-absolute-or-specify-root-to-res-sendfile-failed"
        readType
        :
        "IMG"
        */
        $("#logs").empty();
        for (var i = 0; i < data.length; i++) {
            var readType = data[i].readType == "IMG" ? "Images" : "Flipkart"
            var eleConatiner = $('<div class="container"></div>');
            var h4 = $('<h4 class="bold"><b>' + readType + '</b></h4>');
            eleConatiner.append(h4);
            var btn = $('<button type="button" class="btn btn-info" data-toggle="collapse" data-target="#data' + i + ' "+>ORIGIN :: ' + data[i].origin + '</button>')
            eleConatiner.append(btn);
            if (data[i].readType == "IMG") {
                var collapse = $('<div id="data' + i + '" class="collapse"></div>');
                for(var j=0;j<data[i].data.length;j++){
                    var anchor = $('<p><a target="_blank" href="'+ data[i].data[j] +'">'+ data[i].data[j] + '</a></p>');
                    collapse.append(anchor);
                }
                eleConatiner.append(collapse);

            } else {
                var text = $('<div id="data' + i + '" class="collapse">' + data[i].data.join() + '</div>')
                eleConatiner.append(text);
            }

            $("#logs").append(eleConatiner)
        }



    }
})();
{'fraction_non_alphanumeric': 0.18562231759656653, 'fraction_numerical': 0.008315450643776824, 'mean_word_length': 1.692418772563177, 'pattern_counts': {'":': 1, '<': 40, '<?xml version=': 0, '>': 37, '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': '6052063', 'n_tokens_mistral': 1170, 'n_tokens_neox': 1136, 'n_words': 206}