<commit_before>    var call_on_click = function(addr) {
        //alert(addr);
        window.location.href  = 'http://' + addr;
        return false;
    };
        setInterval(
            function() {
                $.ajax({
                    type: "GET",
                    url: '/get_intranet_servers',
                    success: function(data1) {
                        var returned= eval( "(" + data1 + ")");
                        var i = 0;
                        $("#local_machine_in_intranet").html(   '<div>Your intranet public IP:' + returned.intranetPublicIp + 
                                                                '</div><br><br>Your local servers:<br>');
                        for (i = 0 ; i < returned.allServers.length; i++) {
                            var ss = returned.allServers[i];
                            var intranetGoShareDataHost = ss.internal_host + ":" + ss.internal_port;
                            var  blocked  =  '';
                            $.ajax({
                                type: "GET",
                                url: "http://" + intranetGoShareDataHost + '/test_firewall',
                                data: {
                                    tracking_id: '7698698768768', //generate a random number here
                                    server:      intranetGoShareDataHost
                                },
                                success: function(data) {
                                    //alert(JSON.stringify(data,null,2));
                                    console.log( JSON.stringify(data,null,2) );
                                    var intranetGoShareDataHost = eval( "(" + data + ")").server;
                                    var quotedIntranetGoShareDataHost =  '"' + intranetGoShareDataHost + '"';
                                   blocked = '(all ok)';
                                    var newHtml =  "<div>" +
                                                "<a href='#' onclick='call_on_click(" + quotedIntranetGoShareDataHost + ");'> " + intranetGoShareDataHost + "</a> " +
                                                blocked + "</div>";
                                    $("#local_machine_in_intranet").append('<div>' + newHtml + '</div>' );
                                },
                                error: function(jqXHR, textStatus, errorThrown) {
                                    var intranetGoShareDataHost = eval( "(" + data + ")").server;
                                    var quotedIntranetGoShareDataHost =  '"' + intranetGoShareDataHost + '"';
                                   blocked = '(Probably blocked by firewall)';
                                    var newHtml =  "<div>" +
                                                "<a href='#' onclick='call_on_click(" + quotedIntranetGoShareDataHost + ");'> " + intranetGoShareDataHost + "</a> " +
                                                blocked + "</div>";
                                    $("#local_machine_in_intranet").append('<div style="width: 200px;">' + newHtml + '</div>' );
                                }
                            });
                        }                            
                        
                        
                    },
                    error: function(jqXHR, textStatus, errorThrown) {
                        $("#local_machine_in_intranet").html("Error. No local servers available on your intranet right now" );
                    }
                });
                
                
                

                
                },1000);<commit_msg>check intranet nodes every 4 seconds<commit_after>    var call_on_click = function(addr) {
        //alert(addr);
        window.location.href  = 'http://' + addr;
        return false;
    };
    
    
    var checkServers = function() {
                $.ajax({
                    type: "GET",
                    url: '/get_intranet_servers',
                    success: function(data1) {
                        var returned= eval( "(" + data1 + ")");
                        var i = 0;
                        $("#local_machine_in_intranet").html(   '<div>Your intranet public IP:' + returned.intranetPublicIp + 
                                                                '</div><br>Your local servers:<br><br>');
                        for (i = 0 ; i < returned.allServers.length; i++) {
                            var ss = returned.allServers[i];
                            var intranetGoShareDataHost = ss.internal_host + ":" + ss.internal_port;
                            var  blocked  =  '';
                            $.ajax({
                                type: "GET",
                                url: "http://" + intranetGoShareDataHost + '/test_firewall',
                                data: {
                                    tracking_id: '7698698768768', //generate a random number here
                                    server:      intranetGoShareDataHost
                                },
                                success: function(data) {
                                    //alert(JSON.stringify(data,null,2));
                                    console.log( JSON.stringify(data,null,2) );
                                    var intranetGoShareDataHost = eval( "(" + data + ")").server;
                                    var quotedIntranetGoShareDataHost =  '"' + intranetGoShareDataHost + '"';
                                   blocked = '(all ok)';
                                    var newHtml =  "<div>" +
                                                "<a href='#' onclick='call_on_click(" + quotedIntranetGoShareDataHost + ");'> " + intranetGoShareDataHost + "</a> " +
                                                blocked + "</div>";
                                    $("#local_machine_in_intranet").append('<div>' + newHtml + '</div>' );
                                },
                                error: function(jqXHR, textStatus, errorThrown) {
                                    //var intranetGoShareDataHost = eval( "(" + data + ")").server;
                                    var quotedIntranetGoShareDataHost =  '"' + intranetGoShareDataHost + '"';
                                    blocked = '(Probably blocked by firewall)';
                                    var newHtml =  "<div>" +
                                                "<a href='#' onclick='call_on_click(" + quotedIntranetGoShareDataHost + ");'> " + intranetGoShareDataHost + "</a> " +
                                                blocked + "</div>";
                                    $("#local_machine_in_intranet").append('<div style="width: 200px;">' + newHtml + '</div>' );
                                }
                            });
                        }                            
                        
                        
                    },
                    error: function(jqXHR, textStatus, errorThrown) {
                        $("#local_machine_in_intranet").html("Error. No local servers available on your intranet right now" );
                    }
                });
                };
    
    checkServers();
    setInterval(checkServers,4000);
{'fraction_non_alphanumeric': 0.11003014524527267, 'fraction_numerical': 0.007262263633872294, 'mean_word_length': 0.8933852140077821, 'pattern_counts': {'":': 2, '<': 39, '<?xml version=': 0, '>': 37, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 52, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3555317', 'n_tokens_mistral': 1714, 'n_tokens_neox': 1603, 'n_words': 296}