<commit_before><% @times.each do |hours| %>
  <div style="float:left;display:inline-block;padding:0 0.5em;width:<%= 100 / @times.to_a.length.to_f %>%;font-size:0.01em;height:10vh;"><%= hours %></div>
<% end %>

<script>
  $("div").each(function() {
    var thisDiv = this;
    $.ajax({
      url:"/api/sky_color?hours=" + thisDiv.innerHTML,
      dataType:"json",
      complete: function(data) {
        $(thisDiv).css("background-color", data.responseJSON);
      }
    });
  });
</script><commit_msg>Add range slider for hours to sky_color_test<commit_after><% @times.each do |hours| %>
  <div style="float:left;display:inline-block;padding:0 0.5em;width:<%= 100 / @times.to_a.length.to_f %>%;font-size:0.01em;height:10vh;"><%= hours %></div>
<% end %>

<script>
  var hours = 0.0;

  $("div").each(function() {
    var thisDiv = this;
    $.ajax({
      url:"/api/sky_color?hours=" + thisDiv.innerHTML,
      dataType:"json",
      complete: function(data) {
        $(thisDiv).css("background-color", data.responseJSON);
      }
    });
  });

  $(document).ready(function() {
    $("body").append(
      $("<input id='hours-range' type='range' min='0' max='24' step='0.05'></input>").css("width", "100vw"));
      $("#hours-range").on("input", function() {
        hours = parseFloat(this.value);
        $("#test-hours")[0].innerHTML = hours;
        changeBackgroundColor(hours);
      });
    $("body").append($("<span id='test-hours'></span>"));
    window.clearInterval(intervalID);
    $("html").css("transition", "none");
    $("*").css("margin", "0");
  });
</script>
{'fraction_non_alphanumeric': 0.23908918406072105, 'fraction_numerical': 0.022137887413029727, 'mean_word_length': 3.625730994152047, 'pattern_counts': {'":': 0, '<': 23, '<?xml version=': 0, '>': 23, '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': '4138220', 'n_tokens_mistral': 593, 'n_tokens_neox': 549, 'n_words': 85}