<commit_before>// Split.js, Clientside A/B testing library
// v0.1.0
// http://github.com/andrew/split.js
// (c) 2011 <NAME> [<EMAIL>]
// released under the MIT license

Split = (function(){
  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 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 eraseCookie(name) {
    createCookie(name,"",-1);
  }

  Object.prototype.keys = function ()
  {
    var keys = [];
    for(var i in this) if (this.hasOwnProperty(i))
    {
      keys.push(i);
    }
    return keys;
  }

  function init(){
    alternatives = arguments[0]
    keys = alternatives.keys()

    var alternative = readCookie('abTest')
    if (alternative) {
      console.log('found existing cookie')
    } else {
      alternative = keys[Math.floor(Math.random()*keys.length)]
      createCookie('abTest', alternative, 30)
    }
    var _gaq = _gaq || [];
    _gaq.push(['_setCustomVar', 1, 'AB Test alternative', alternative, 1]);
    alternatives[alternative]();
  }
  return {
    setup: function(args){
      init(args)
      }
    }
})();<commit_msg>Removed console log<commit_after>// Split.js, Clientside A/B testing library
// v0.1.0
// http://github.com/andrew/split.js
// (c) 2011 <NAME> [<EMAIL>]
// released under the MIT license

Split = (function(){
  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 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 eraseCookie(name) {
    createCookie(name,"",-1);
  }

  Object.prototype.keys = function ()
  {
    var keys = [];
    for(var i in this) if (this.hasOwnProperty(i))
    {
      keys.push(i);
    }
    return keys;
  }

  function init(){
    alternatives = arguments[0]
    keys = alternatives.keys()

    var alternative = readCookie('abTest')
    if (alternative) {
    } else {
      alternative = keys[Math.floor(Math.random()*keys.length)]
      createCookie('abTest', alternative, 30)
    }
    var _gaq = _gaq || [];
    _gaq.push(['_setCustomVar', 1, 'AB Test alternative', alternative, 1]);
    alternatives[alternative]();
  }
  return {
    setup: function(args){
      init(args)
      }
    }
})();
{'fraction_non_alphanumeric': 0.17692062480076506, 'fraction_numerical': 0.01721389862926363, 'mean_word_length': 2.785283474065139, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 7, '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': '6374447', 'n_tokens_mistral': 1122, 'n_tokens_neox': 1077, 'n_words': 225}