<commit_before>function Circle (options) {
  this.position = options.position
  this.color = options.color
  this.fillColor = options.fillColor
  this.radius = options.radius
  this.width = options.width

  this._shouldRedraw = true
}

Circle.prototype.shouldRedraw = function () {
  return this._shouldRedraw
}

Circle.prototype.onadd = function (layer) {}
Circle.prototype.onremove = function (layer) {}
Circle.prototype.plot = function (layer) {}

Circle.prototype.draw = function (layer) {
  layer.drawCircle({
    position: this.position,
    color: this.color,
    fillColor: this.fillColor,
    radius: this.radius,
    width: this.width
  })

  this._shouldRedraw = false
}<commit_msg>Animate circle example<commit_after>/*
global Animation
*/

function Circle (options) {
  this.position = options.position
  this.color = options.color
  this.fillColor = options.fillColor
  this.minRadius = options.minRadius
  this.maxRadius = options.maxRadius
  this.width = options.width
  this.duration = options.duration
  this.delay = options.delay

  this._radius = this.minRadius

  this.animationDelay = new Animation({
    duration: this.delay
  })
  this.animationGrowUp = new Animation({
    duration: this.duration,
    handler: this._growUpHanlder.bind(this)
  })
  this.animationGrowDown = new Animation({
    duration: this.duration,
    handler: this._growDownHanlder.bind(this)
  })
  this.animationDelay.queue(this.animationGrowUp)
  this.animationGrowUp.queue(this.animationGrowDown)
  this.animationGrowDown.queue(this.animationDelay)
}

Circle.prototype.shouldRedraw = function () {
  return true
}

Circle.prototype.onadd = function (layer) {
  this.animation.start()
}

Circle.prototype.onremove = function (layer) {
  this.animation.stop()
}

Circle.prototype.plot = function (layer, time) {
  this.animation.animate(time)
}

Circle.prototype.draw = function (layer) {
  layer.drawCircle({
    position: this.position,
    color: this.color,
    fillColor: this.fillColor,
    radius: this._radius,
    width: this.width
  })
}

Circle.prototype._growUpHanlder = function (t) {
  this._radius = this.minRadius + t * (this.maxRadius - this.minRadius)
}

Circle.prototype._growDownHanlder = function (t) {
  this._radius = this.maxRadius - t * (this.maxRadius - this.minRadius)
}
{'fraction_non_alphanumeric': 0.11803135888501742, 'fraction_numerical': 0.0, 'mean_word_length': 3.9718614718614718, 'pattern_counts': {'":': 0, '<': 3, '<?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': '6915213', 'n_tokens_mistral': 746, 'n_tokens_neox': 727, 'n_words': 139}