<commit_before>var opts = {
    count: 3,
    size: 50,
    sizeRandom: 10,
    sparkLife: 0.1,
    spawnOpacity: 1,

    //must be RGBA. alpha stands for opacity, usually 1
    color: "rgba(0,0,0, alpha)"
  },

  canvasBody = document.getElementById("canvas"),
  canvas = canvasBody.getContext("2d"),
  h = canvasBody.width = window.innerWidth,
  w = canvasBody.height = window.innerHeight;
//document.getElementsByClassName("card")[0].style["background-color"] = opts.color.replace("alp", "1");
function step() {
  var fillColor = opts.color.replace("alpha", opts.spawnOpacity);
  canvas.fillStyle = fillColor;
  for (var i = 0; i < Math.round(opts.count); i++) {
    var random = Math.random() * opts.sizeRandom;
    canvas.fillRect(-(opts.size/2) + Math.random() * h, -(opts.size/2) + Math.random() * w, opts.size + random, opts.size + random)
  }
  canvas.fillStyle = "rgba(255,255,255," + opts.sparkLife + ")"
  canvas.fillRect(0, 0, h, w)
}

function anim() {
  setTimeout(function() {
    window.requestAnimationFrame(anim)
  }, 1000 / 30)
  step();
}

anim();<commit_msg>3.2<commit_after>var opts = {
    count: 3,
    size: 50,
    sizeRandom: 10,
    sparkLife: 0.1,
    spawnOpacity: 1,

    //must be RGBA. alpha stands for opacity, usually 1
    color: "rgba(0,0,0, alpha)"
  },

  canvasBody = document.getElementById("canvas"),
  canvas = canvasBody.getContext("2d"),
  h = canvasBody.width = window.innerWidth,
  w = canvasBody.height = window.innerHeight;
//document.getElementsByClassName("card")[0].style["background-color"] = opts.color.replace("alp", "1");
function step() {
  var fillColor = opts.color.replace("alpha", opts.spawnOpacity);
  canvas.fillStyle = fillColor;
  for (var i = 0; i < Math.round(opts.count); i++) {
    var random = Math.random() * opts.sizeRandom;
    canvas.fillRect(-(opts.size/2) + Math.random() * h, -(opts.size/2) + Math.random() * w, opts.size + random, opts.size + random)
  }
  canvas.fillStyle = "rgba(255,255,255," + opts.sparkLife + ")"
  canvas.fillRect(0, 0, h, w)
}

function anim() {
  setTimeout(function() {
    window.requestAnimationFrame(anim)
  }, 1000 / 30)
  step();
}

anim();
window.addEventListener("resize", function(){
  w = canvasBody.width = window.innerWidth;
  h = canvasBody.height = window.innerHeight;
})
{'fraction_non_alphanumeric': 0.1743119266055046, 'fraction_numerical': 0.03145478374836173, 'mean_word_length': 3.7708333333333335, 'pattern_counts': {'":': 0, '<': 5, '<?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': '4345702', 'n_tokens_mistral': 842, 'n_tokens_neox': 793, 'n_words': 169}