<commit_before>var data = "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000011111110000000000001111111000000000000000011111111111000000001111111111100000000000001111111111111000000111111111111100000000000111111111111111000011111111111111100000000011111111111111111001111111111111111100000001111111111111111111111111111111111111100000011111111111111111111111111111111111111000000111111111111111111111111111111111111110000011111111111111111111111111111111111111110000111111111111111111111111111111111111111100001111111111111111111111111111111111111111000011111111111111111111111111111111111111110000111111111111111111111111111111111111111100000111111111111111111111111111111111111110000001111111111111111111111111111111111111100000011111111111111111111111111111111111111000000111111111111111111111111111111111111110000000111111111111111111111111111111111111000000001111111111111111111111111111111111110000000001111111111111111111111111111111111000000000011111111111111111111111111111111110000000000011111111111111111111111111111111000000000000011111111111111111111111111111100000000000000011111111111111111111111111110000000000000000011111111111111111111111111000000000000000000011111111111111111111111100000000000000000000011111111111111111111110000000000000000000000011111111111111111111000000000000000000000000001111111111111111000000000000000000000000000001111111111111100000000000000000000000000000001111111111110000000000000000000000000000000001111111111000000000000000000000000000000000001111111100000000000000000000000000000000000001111110000000000000000000000000000000000000001111000000000000000000000000000000000000000001100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000".split('');
var countOfOnes = data.filter(function(v) { return v=="1"}).length;

function createHeartGrid() {
    var heart = document.getElementById("heart");

    var rowCount = 44;
    var colCount = 44;

    for (var r=0; r < (data.length / colCount); r++) {
        var rd = document.createElement("div");
        rd.className = "row";
        heart.appendChild(rd);
        for (var x=0; x<colCount; x++) {
            var i = (r * colCount) + x;
            var cd = document.createElement("div");
            cd.className = "col";
            cd.id = i;
            rd.appendChild(cd);
        }
    }
}

function setRandomPixel() {
    if (countOfOnes > 0) {
        var rndOne = Math.ceil(Math.random() * countOfOnes);
        var j = 0, i = 0;
        for(; i<data.length && j<rndOne; i++) {
            if (data[i]=="1") { j++; }
        }
        
        data[i-1]="0";
        countOfOnes--;
        document.getElementById(i-1).style.backgroundColor="Red";
    }
}

var log = document.getElementById("log");
function logMessage(msg) {
        var md = document.createElement('div');
        md.innerText = Date().toString() + " " + msg;
        log.insertBefore(md, log.firstChild);
}

createHeartGrid();

var socket = io('http://localhost:3000', { transports: ["websocket","jsonp-polling","xhr-polling","polling"] });
socket.on('msg', function(msg) {
    console.log('socket.io: ' + msg);
        setRandomPixel();
        logMessage(msg);
});
 
<commit_msg>removing static url from client connection<commit_after>var data = "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000011111110000000000001111111000000000000000011111111111000000001111111111100000000000001111111111111000000111111111111100000000000111111111111111000011111111111111100000000011111111111111111001111111111111111100000001111111111111111111111111111111111111100000011111111111111111111111111111111111111000000111111111111111111111111111111111111110000011111111111111111111111111111111111111110000111111111111111111111111111111111111111100001111111111111111111111111111111111111111000011111111111111111111111111111111111111110000111111111111111111111111111111111111111100000111111111111111111111111111111111111110000001111111111111111111111111111111111111100000011111111111111111111111111111111111111000000111111111111111111111111111111111111110000000111111111111111111111111111111111111000000001111111111111111111111111111111111110000000001111111111111111111111111111111111000000000011111111111111111111111111111111110000000000011111111111111111111111111111111000000000000011111111111111111111111111111100000000000000011111111111111111111111111110000000000000000011111111111111111111111111000000000000000000011111111111111111111111100000000000000000000011111111111111111111110000000000000000000000011111111111111111111000000000000000000000000001111111111111111000000000000000000000000000001111111111111100000000000000000000000000000001111111111110000000000000000000000000000000001111111111000000000000000000000000000000000001111111100000000000000000000000000000000000001111110000000000000000000000000000000000000001111000000000000000000000000000000000000000001100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000".split('');
var countOfOnes = data.filter(function(v) { return v=="1"}).length;

function createHeartGrid() {
    var heart = document.getElementById("heart");

    var rowCount = 44;
    var colCount = 44;

    for (var r=0; r < (data.length / colCount); r++) {
        var rd = document.createElement("div");
        rd.className = "row";
        heart.appendChild(rd);
        for (var x=0; x<colCount; x++) {
            var i = (r * colCount) + x;
            var cd = document.createElement("div");
            cd.className = "col";
            cd.id = i;
            rd.appendChild(cd);
        }
    }
}

function setRandomPixel() {
    if (countOfOnes > 0) {
        var rndOne = Math.ceil(Math.random() * countOfOnes);
        var j = 0, i = 0;
        for(; i<data.length && j<rndOne; i++) {
            if (data[i]=="1") { j++; }
        }
        
        data[i-1]="0";
        countOfOnes--;
        document.getElementById(i-1).style.backgroundColor="Red";
    }
}

var log = document.getElementById("log");
function logMessage(msg) {
        var md = document.createElement('div');
        md.innerText = Date().toString() + " " + msg;
        log.insertBefore(md, log.firstChild);
}

createHeartGrid();

var socket = io();
socket.on('msg', function(msg) {
    console.log('socket.io: ' + msg);
        setRandomPixel();
        logMessage(msg);
});
 

{'fraction_non_alphanumeric': 0.07500366945545281, 'fraction_numerical': 0.5730221635109349, 'mean_word_length': 6.673423423423423, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 132, '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': '2801794', 'n_tokens_mistral': 4849, 'n_tokens_neox': 1417, 'n_words': 201}