<commit_before>    function readCookie(name) {
        var nameEQ = name + "=";
        var ca = document.cookie.split(';');
        for (var i = 0; i < ca.length; i++) {
            var c = ca[i];
            while (c.charAt(0) == ' ') c = c.substring(1, c.length);
            if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length, c.length);
        }
        return null;
    }
    //Set width of screen in a cookie
    (function (w, d) {

        //set width to vpw
        var e = d.documentElement, g = d.getElementsByTagName('body')[0], vpw = w.innerWidth || e.clientWidth || g.clientWidth;

        var existing = readCookie("RESS");
        var bp;

        //set break point
        if (vpw >= 1024) {
            vpw = 1024;
            bp = "w";
        } else if (vpw >= 768) {
            bp = "m";
        } else {
            bp = "n";
        }

        // Set a cookie with the client side capabilities. 
        // There is two specified groups which can be used to scale images to a predefined width in pixels using:
        // http://<SERVICE_URL>/gn_<GROUPNAME>/<IMG_URL>
        var ccapDate = new Date()
        ccapDate.setFullYear(ccapDate.getFullYear() + 1);
        d.cookie = 'RESS=vpw.' + vpw + '|bp.' + bp + '|g.groupName1.320' + '|g.groupName2.640' + '; domain=*'

    }(window, document));<commit_msg>added devicePixelRatio to cookie<commit_after>    function readCookie(name) {
        var nameEQ = name + "=";
        var ca = document.cookie.split(';');
        for (var i = 0; i < ca.length; i++) {
            var c = ca[i];
            while (c.charAt(0) == ' ') c = c.substring(1, c.length);
            if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length, c.length);
        }
        return null;
    }
    //Set width of screen in a cookie
    (function (w, d) {

        //set width to vpw
        var e = d.documentElement, g = d.getElementsByTagName('body')[0], vpw = w.innerWidth || e.clientWidth || g.clientWidth;

        var existing = readCookie("RESS");
        var bp;

        //set break point
        if (vpw >= 1024) {
            vpw = 1024;
            bp = "w";
        } else if (vpw >= 768) {
            bp = "m";
        } else {
            bp = "n";
        }
        
        // Set devicePixelRatio for used on retina screens
        var dpr = 1;
        if(window.devicePixelRatio !== undefined) dpr = window.devicePixelRatio;
        console.log('DevicePixelRatio' + dpr);

        // Set a cookie with the client side capabilities. 
        // There is two specified groups which can be used to scale images to a predefined width in pixels using:
        // http://<SERVICE_URL>/gn_<GROUPNAME>/<IMG_URL>
        // Make sure to use your own domain
        var ccapDate = new Date()
        ccapDate.setFullYear(ccapDate.getFullYear() + 1);
        d.cookie = 'RESS=vpw.' + vpw + '|bp.' + bp + '|g.groupName1.320' + '|g.groupName2.640' + '|dpr.' + dpr + '; domain=*';

    }(window, document));
{'fraction_non_alphanumeric': 0.14525327071452532, 'fraction_numerical': 0.017108352901710835, 'mean_word_length': 1.8292220113851991, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 13, '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': '6634189', 'n_tokens_mistral': 1002, 'n_tokens_neox': 943, 'n_words': 273}