<commit_before>"use strict";

window.onload = function() {
  var cvs = document.getElementById("cvs"),
    cxt = cvs.getContext("2d"),
    iData = cxt.getImageData(0, 0, cvs.width, cvs.height);

  var hRange = document.getElementById("hval");
  hRange.addEventListener("change", function(e){
    refreshPlot(cxt, iData, e.target.value | 0);
  });

  refreshPlot(cxt, iData, 0);
};

function map(v, rl, rh, dl, dh) {
  return dl + (v - rl) * (dh - dl) / (rh - rl);
}

function refreshPlot(cxt, iData, H) {
  H = H || 0;
  var width = iData.width, height = iData.height;
  var l, c, len1, len2, L, C, rgb,
      scan, scanWid = width * 4, idx,
      data = iData.data;
  for (l = 0 ; l < height; l++) {
    L = (height - l) * 100 / height;
    scan = l * scanWid;
    for (c = 0 ; c < width; c++) {
      C = c * 200 / width;
      rgb = Hue.LCHtoRGB([L, C, H]);
      // rgb = LCHtoRGB(L, C, H);
      // rgb = chroma(L, C, H, 'lch').rgb();
      idx = scan + c * 4;<commit_msg>Minor UI changes<commit_after>"use strict";

window.onload = function() {
  var cvs = document.getElementById("cvs"),
    cxt = cvs.getContext("2d"),
    iData = cxt.getImageData(0, 0, cvs.width, cvs.height);

  var hRange = document.getElementById("hval");
  hRange.addEventListener("input", function(e){
    refreshPlot(cxt, iData, e.target.value | 0);
  });

  refreshPlot(cxt, iData, 0);
};

function map(v, rl, rh, dl, dh) {
  return dl + (v - rl) * (dh - dl) / (rh - rl);
}

function refreshPlot(cxt, iData, H) {
  H = H || 0;
  var width = iData.width, height = iData.height;
  var l, c, len1, len2, L, C, rgb,
      scan, scanWid = width * 4, idx,
      data = iData.data;
  for (l = 0 ; l < height; l++) {
    L = (height - l) * 100 / height;
    scan = l * scanWid;
    for (c = 0 ; c < width; c++) {
      C = c * 200 / width;
      rgb = Hue.LCHtoRGB([L, C, H]);
      // rgb = LCHtoRGB(L, C, H);
      // rgb = chroma(L, C, H, 'lch').rgb();
      idx = scan + c * 4;
{'fraction_non_alphanumeric': 0.1901840490797546, 'fraction_numerical': 0.018404907975460124, 'mean_word_length': 2.5517241379310347, 'pattern_counts': {'":': 0, '<': 7, '<?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': '6548394', 'n_tokens_mistral': 830, 'n_tokens_neox': 782, 'n_words': 217}