<commit_before>var Dusk = function(target) {

  this.target = target
  this.delay = 10000   // allow 10 seconds of collection lag
  this.step = 10000    // 10 seconds per value
  this.width = 940     // 940 grid

  this.colors = [ '#08519c', '#*82bd', '#6baed6', '#fee6ce', '#fdae6b', '#e6550d' ]

  this.context = cubism.context().serverDelay(this.delay).step(this.step).size(this.width)
  this.graphite = this.context.graphite(window.location.origin)
  this.horizon = this.context.horizon().height(10).colors(this.colors)
  
  this.generateAxis = function() {
    var myContext = this.context
    d3.select('div.wrapper').selectAll('.axis')
      .data(['top', 'bottom'])
      .enter().append('div').attr('class', 'fluid-row')
      .attr('class', function(d) { return d + ' axis' })
      .each(function(d) {
        d3.select(this).call(myContext.axis().ticks(12).orient(d))
      })
  }

  this.generateRule = function() {
    d3.select('div.wrapper').append('div')
      .attr('class', 'rule')
      .call(this.context.rule())
  }
  
  this.generateHorizons = function() {
    var myGraphite = this.graphite
    var myHorizon = this.horizon
    var myContext = this.context
    myGraphite.find(this.target, function(error, results) {
      console.log(error)
      var metrics = []
      for (var i=0; i<results.length; i++) {
        var metric = myGraphite.metric(results[i])
        metric.alias(results[i].replace(/_rs_github_com/, '').split('.')[1])
        metrics.push(metric)
      }
      d3.select('div.wrapper').selectAll('.horizon')
        .data(metrics)
        .enter().insert('div', '.bottom')
        .attr('class', 'horizon').call(myHorizon)
      $('div.horizon').hover(function() {
        $(this).addClass('hover')
        $(this).find('canvas').addClass('hover')
      }, function() {
        $(this).removeClass('hover')
        $(this).find('canvas').removeClass('hover')
      })
      myContext.on('focus', function(i) {
        d3.selectAll('.value').style('right', i == null ? null : myContext.size() - 1 - i + 'px')
      })
    })
  }
}
<commit_msg>values stop chasing pointer<commit_after>var Dusk = function(target) {

  this.target = target
  this.delay = 10000   // allow 10 seconds of collection lag
  this.step = 10000    // 10 seconds per value
  this.width = 940     // 940 grid

  this.colors = [ '#08519c', '#*82bd', '#6baed6', '#fee6ce', '#fdae6b', '#e6550d' ]

  this.context = cubism.context().serverDelay(this.delay).step(this.step).size(this.width)
  this.graphite = this.context.graphite(window.location.origin)
  this.horizon = this.context.horizon().height(10).colors(this.colors)
  
  this.generateAxis = function() {
    var myContext = this.context
    d3.select('div.wrapper').selectAll('.axis')
      .data(['top', 'bottom'])
      .enter().append('div').attr('class', 'fluid-row')
      .attr('class', function(d) { return d + ' axis' })
      .each(function(d) {
        d3.select(this).call(myContext.axis().ticks(12).orient(d))
      })
  }

  this.generateRule = function() {
    d3.select('div.wrapper').append('div')
      .attr('class', 'rule')
      .call(this.context.rule())
  }
  
  this.generateHorizons = function() {
    var myGraphite = this.graphite
    var myHorizon = this.horizon
    var myContext = this.context
    myGraphite.find(this.target, function(error, results) {
      console.log(error)
      var metrics = []
      for (var i=0; i<results.length; i++) {
        var metric = myGraphite.metric(results[i])
        metric.alias(results[i].replace(/_rs_github_com/, '').split('.')[1])
        metrics.push(metric)
      }
      d3.select('div.wrapper').selectAll('.horizon')
        .data(metrics)
        .enter().insert('div', '.bottom')
        .attr('class', 'horizon').call(myHorizon)
      $('div.horizon').hover(function() {
        $(this).addClass('hover')
        $(this).find('canvas').addClass('hover')
      }, function() {
        $(this).removeClass('hover')
        $(this).find('canvas').removeClass('hover')
      })
    })
  }
}

{'fraction_non_alphanumeric': 0.19123111221203865, 'fraction_numerical': 0.02278919990091652, 'mean_word_length': 2.9090029041626333, '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': '633426', 'n_tokens_mistral': 1384, 'n_tokens_neox': 1323, 'n_words': 211}