<commit_before>function createCookie(name,value,days) {
    if (days) {
        var date = new Date();
        date.setTime(date.getTime()+(days*24*60*60*1000));
        var expires = "; expires="+date.toGMTString();
    }
    else var expires = "";
    document.cookie = name+"="+value+expires+"; path=/";
}

function adOptOut() {
    createCookie('ad-opt-out', '1', 3650); // 3650 days is 10 years, which isn't forever, but is close enough
    var gad = document.getElementById('gad');
    var lgad = document.getElementById('lgad');
    gad.parentElement.removeChild(gad);
    lgad.parentElement.removeChild(lgad);
}

function browse() {
    var file = document.getElementById('browse');<commit_msg>add cookie remove function, if days 0 set to expire<commit_after>function createCookie(name,value,days) {
    if (days) {
        var date = new Date();
        date.setTime(date.getTime()+(days*24*60*60*1000));
        var expires = "; expires="+date.toGMTString();
    }
    else var expires = "; expires=Thu, 01-Jan-1970 00:00:01 GMT";
    document.cookie = name+"="+value+expires+"; path=/";
}

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;
}

function adOptOut() {
    createCookie('ad-opt-out', '1', 3650); // 3650 days is 10 years, which isn't forever, but is close enough
    var gad = document.getElementById('gad');
    var lgad = document.getElementById('lgad');
    gad.parentElement.removeChild(gad);
    lgad.parentElement.removeChild(lgad);
}

function browse() {
    var file = document.getElementById('browse');
{'fraction_non_alphanumeric': 0.16657443276148312, 'fraction_numerical': 0.0326508024349751, 'mean_word_length': 3.508728179551122, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 3, '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': '5780430', 'n_tokens_mistral': 648, 'n_tokens_neox': 589, 'n_words': 133}