<commit_before>var elem, two, gen, height, width, params, gene, rects, topOffset, pivot;
var steps, base, str, type;

function generate(){
  gen.setBase(base);
  gen.setSteps(steps);
  gen.setStrength(str);
  gen.setPivot(pivot);
  [
    gen.linear,
    gen.linearR,
    gen.distill,
    gen.distillR,
    gen.shade,
    gen.shadeR
  ][type]();
}

function runMe() {
  height = document.body.scrollHeight-topOffset;
  width = document.body.scrollWidth*2;
  document.getElementById("interactions-container").style.top = window.innerHeight/2 - (document.getElementById("interactions-container").offsetHeight/2) + topOffset/2 + "px";

  two.appendTo(elem);
  two.clear();
  generate();
  gene = gen.getGenerated();
  var colorArr = ["00", "00", "00"];
  colorArr[pivot] = "ff";

  document.getElementById("more").style.color = "#"+colorArr.join();
  document.getElementById("less").style.color = "#"+colorArr.join();

  rects = gene.map(function (g, i) {
    var temp = two.makeRectangle(0, (height / steps * (i+.5))+topOffset, width, height/steps);
    temp.fill = "#" + g;
    temp.opacity = 1;
    temp.stroke = "#" + g;
    temp.lineWidth = 1;
    return temp;
  });
  two.update();
}

function morePerc(){
  str += 5;
  if (str>100){
    str = 100;
  }
  runMe();
}

function lessPerc(){
  str -= 5;
  if (str<0){
    str = 0;
  }
  runMe();
}

function moreC(){
  if (steps<window.innerHeight/35){
    steps++;
  }
  runMe();
}

function lessC(){
  if (steps>2){
    steps--;
  }
  runMe();
}

function getV(){
  var value = base[pivot];
  return value;
}

function setV(value){
  var v1 = base[0].toString(16);
  var v2 = base[1].toString(16);
  var v3 = base[2].toString(16);
  value = value.toString(16);
  while (value.length !== 2){
    value =  "0"+value;
  }
  while (v1.length !== 2){
    v1 = "0"+v1;
  }
  while (v2.length !== 2){
    v2 = "0"+v2;
  }
  while (v3.length !== 2){
    v3 = "0"+v3;
  }
  if (pivot == 0){
    return ""+value+v2+v3;
  }
  if (pivot == 1){
    return ""+v1+value+v3;
  }
  if (pivot == 2){
    return ""+v1+v2+value;
  }
}

function moreV(){
  var value = getV();
  value += 5;
  if (value > 255){
    value = 255;<commit_msg>Low hanging codeacy fruit<commit_after>var elem, two, gen, height, width, params, gene, rects, topOffset, pivot;
var steps, base, str, type;

function generate(){
  gen.setBase(base);
  gen.setSteps(steps);
  gen.setStrength(str);
  gen.setPivot(pivot);
  [
    gen.linear,
    gen.linearR,
    gen.distill,
    gen.distillR,
    gen.shade,
    gen.shadeR
  ][type]();
}

function runMe() {
  height = document.body.scrollHeight-topOffset;
  width = document.body.scrollWidth*2;
  document.getElementById("interactions-container").style.top = window.innerHeight/2 - (document.getElementById("interactions-container").offsetHeight/2) + topOffset/2 + "px";

  two.appendTo(elem);
  two.clear();
  generate();
  gene = gen.getGenerated();
  var colorArr = ["00", "00", "00"];
  colorArr[pivot] = "ff";

  document.getElementById("more").style.color = "#"+colorArr.join();
  document.getElementById("less").style.color = "#"+colorArr.join();

  rects = gene.map(function (g, i) {
    var temp = two.makeRectangle(0, (height / steps * (i+.5))+topOffset, width, height/steps);
    temp.fill = "#" + g;
    temp.opacity = 1;
    temp.stroke = "#" + g;
    temp.lineWidth = 1;
    return temp;
  });
  two.update();
}

function morePerc(){
  str += 5;
  if (str>100){
    str = 100;
  }
  runMe();
}

function lessPerc(){
  str -= 5;
  if (str<0){
    str = 0;
  }
  runMe();
}

function moreC(){
  if (steps<window.innerHeight/35){
    steps++;
  }
  runMe();
}

function lessC(){
  if (steps>2){
    steps--;
  }
  runMe();
}

function getV(){
  var value = base[pivot];
  return value;
}

function setV(value){
  var v1 = base[0].toString(16);
  var v2 = base[1].toString(16);
  var v3 = base[2].toString(16);
  value = value.toString(16);
  while (value.length !== 2){
    value =  "0"+value;
  }
  while (v1.length !== 2){
    v1 = "0"+v1;
  }
  while (v2.length !== 2){
    v2 = "0"+v2;
  }
  while (v3.length !== 2){
    v3 = "0"+v3;
  }
  if (pivot === 0){
    return ""+value+v2+v3;
  }
  if (pivot === 1){
    return ""+v1+value+v3;
  }
  if (pivot ===2){
    return ""+v1+v2+value;
  }
}

function moreV(){
  var value = getV();
  value += 5;
  if (value > 255){
    value = 255;
{'fraction_non_alphanumeric': 0.1960919540229885, 'fraction_numerical': 0.03402298850574713, 'mean_word_length': 3.100848256361923, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 9, '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': '3035637', 'n_tokens_mistral': 1766, 'n_tokens_neox': 1689, 'n_words': 354}