<commit_before>import Ember from "ember";

export default Ember.Component.extend({
  tagName: "circle",
  classNames: ["ember-pie-chart__chart-circle"],
  value: 0,
  offset: 0,
  duration: 200,
  didInsertElement: function() {
    this.$().attr("r", "25%");
    this.$().attr("cx", "50%");
    this.$().attr("cy", "50%");
    this.$().attr("stroke-dasharray", "0 100");
    this.$().attr("stroke-dashoffset", "0");
    this.$().attr("stroke", this.get("color"));
  },
  didRender: function() {
    // animate the thing!
    if (this.animation) {
      clearInterval(this.animation);
    }

    var duration = this.get("duration");
    var iterations = Math.floor(this.get("duration") / 10);
    var currentValue = parseFloat(this.$().attr("stroke-dasharray").split(" ")[0]);
    var valueIncrement = (this.get("value") - currentValue) / iterations;
    var value = this.get("value");

    var i = 1;
    var _this =  this;
    this.animation = setInterval(function() {
      var newValue = Math.min(valueIncrement * i + currentValue, value);

      _this.$().attr("stroke-dasharray", newValue + " 100");
      if (_this.$().next()) {
        _this.$().next().attr("stroke-dashoffset", -newValue);
      }
      i++;
      if (i > iterations) {<commit_msg>Making animation a little bit slower<commit_after>import Ember from "ember";

export default Ember.Component.extend({
  tagName: "circle",
  classNames: ["ember-pie-chart__chart-circle"],
  value: 0,
  duration: 400,
  didInsertElement: function() {
    this.$().attr("r", "25%");
    this.$().attr("cx", "50%");
    this.$().attr("cy", "50%");
    this.$().attr("stroke-dasharray", "0 100");
    this.$().attr("stroke-dashoffset", "0");
    this.$().attr("stroke", this.get("color"));
  },
  didRender: function() {
    // animate the thing!
    if (this.animation) {
      clearInterval(this.animation);
    }

    var duration = this.get("duration");
    var iterations = Math.floor(this.get("duration") / 10);
    var currentValue = parseFloat(this.$().attr("stroke-dasharray").split(" ")[0]);
    var valueIncrement = (this.get("value") - currentValue) / iterations;
    var value = this.get("value");

    var i = 1;
    var _this =  this;
    this.animation = setInterval(function() {
      var newValue = Math.min(valueIncrement * i + currentValue, value);

      _this.$().attr("stroke-dasharray", newValue + " 100");
      if (_this.$().next()) {
        _this.$().next().attr("stroke-dashoffset", -newValue);
      }
      i++;
      if (i > iterations) {
{'fraction_non_alphanumeric': 0.20618556701030927, 'fraction_numerical': 0.017842981760507533, 'mean_word_length': 3.2332214765100673, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, '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': '6314849', 'n_tokens_mistral': 848, 'n_tokens_neox': 799, 'n_words': 171}