<commit_before>- title "#{@user.name}'s Anime Library"

.large-12.columns.watchlist-option-bar
  .large-2.columns
    %p.option-title Anime Library
  .large-9.columns.options
    %ul.status-tabs.inline-list
      %li.active#tab-all= link_to "All", "#all", onclick: "showRelevantSections('all')"
      - Watchlist.valid_statuses.each do |status|
        %li{:id => "tab-" + status.parameterize}= link_to status, "##{status.parameterize}", onclick: "showRelevantSections(#{status.parameterize.inspect})"

- Watchlist.valid_statuses.each do |status|
  .watchlist-row{:id => "table-" + status.parameterize}
    .large-12.columns.library-status-header
      %h5.status= status
    .row
      .large-12.columns.library-table

%script(type="text/template" id="WatchlistSectionViewTemplate")
  %table.large-12.columns.fake-table-row
    %thead
      %tr
        %th{:width => "505"}= link_to "Title", "#"#, :class => "active"
        %th{:width => "95"}= link_to "Progress", "#"
        %th{:width => "68"}= link_to "Rating", "#"
        %th{:width => "65"}= link_to "Type", "#"

    %tbody.fake-table-row.library-item

    %tbody.loading-indicator
      %tr
        %td.center(colspan=4 style="color: #333")
          %i.icon.icon-spin.icon-spinner.icon-2x
          %span.right(style="color: #aaa; padding-top: 10px")
            (Finished loading <span>0</span> entries.)

%script(type="text/template" id="WatchlistItemViewTemplate")
  %td.library-item-title{:width => "505"}
    .relative-wrapper
      %a{:href => "{{anime.url}}"} {{anime.title}}
      {{#private}}
      %span.private-indicator [PRIVATE]
      {{/private}}
      - if @user == current_user
        %i.icon-reorder
  %td.episode-count{:width => "95"}
    .relative-wrapper 
      - if @user == current_user
        %a.click-add
          %i.icon-angle-up
      <span class="edit">{{episodes_watched}}</span> / {{anime.episode_count}}
  %td{:width => "68"} 
    %span.select
      - if @user.star_rating
        %i.icon-star
        {{rating.value}}
      - else
        {{#rating.positive}}
        %span.positive-smiley :)
        {{/rating.positive}}
        {{#rating.neutral}}
        %span.neutral-smiley :|
        {{/rating.neutral}}
        {{#rating.negative}}
        %span.negative-smiley :(
        {{/rating.negative}}
        {{#rating.unknown}}
        %span.unknown-smiley --
        {{/rating.unknown}}
  %td{:width => "65"} {{anime.show_type}}
  
%script(type="text/template" id="WatchlistDropdownTemplate")
  %tr.library-dropdown
    %td{:style => "background: #fafafa;"}(colspan=4)
      .large-8.columns.meta-content
        .large-12.columns.last-update
          %p Last Library Update: {{formattedLastUpdateTime}}
        .large-3.columns.thumbnail
          %img(src="{{anime.cover_image}}")
        
        // Left side of dropdown with thumbnail and description
        .large-9.columns.library-item-info
          %span.title {{anime.title}}
          .rating
          %span.description {{anime.short_synopsis}}
          %span.description-link
            %a(style="color: #fd864b" href="{{anime.url}}") [Read More]

      // Right side of dropdown with update content
      .large-4.columns.action-area
        .opacity-wrapper
          %form.custom
            .large-12.columns.library-status
              .large-3.columns.option-label
                %span Status:
              .large-9.columns.status-dropdown
                %select.medium(name="status")
                  - Watchlist.valid_statuses.each do |status|
                    %option{:value => status.parameterize}= status

            .large-12.columns.episodes-watched
              .large-3.columns.option-label
                %span Watched:
              .large-9.columns.status-dropdown
                .large-6.columns.episode-input
                  %input(name="episodes_watched" type="number" value="{{episodes_watched}}" min="0" max="{{anime.episode_count}}")
                .large-6.columns.end.episode-count
                  %span.postfix Out of {{anime.episode_count}}

            .large-12.columns.privacy-setting
              .large-3.columns.option-label
                %span Privacy:
              .large-9.columns.privacy-dropdown
                %select.medium(name="privacy")
                  %option(value="public") Public
                  %option(value="private") Private

          .large-12.columns.remove-from-library.text-center
            %span
              %i.icon-remove
              %a.remove-from-library Remove From Library
        // Spinner
        %span.updating-icon.hide
          %i.icon-spinner.icon-spin.updating-icon
            
            
:coffee
  starRatings = #{@user.star_rating.inspect}
  currentUsersProfile = #{@user == current_user}

  setActiveTab = (section) ->
    $(".watchlist-option-bar .options li").removeClass "active"
    $(".watchlist-option-bar .options #tab-" + section).addClass "active"

  WatchlistSections = #{Watchlist.valid_statuses.map {|x| x.parameterize }.inspect}
    
  @showRelevantSections = (x...) ->
    section = if x[0] then x[0] else window.location.hash.substring(1)
    if _.contains WatchlistSections, section
      setActiveTab section
      $(".watchlist-row").hide()
      $("#table-" + section).show()
    else
      setActiveTab "all"
      $(".watchlist-row").show()
      
  showRelevantSections()

  # Models and Collections
  WatchlistItem = Backbone.Model.extend
    update: (data) ->
      if currentUsersProfile
        data.anime_id = this.get("anime").slug
        that = this
        $.post "/watchlist/update", data, (d) ->
          newModel = that.updateSelf(d)
          if that.get("_dropdownOpen")
            newModel.set "_dropdownOpen", true
      
    updateSelf: (d) ->
      oldSection = this.get("status_parameterized")
      newSection = d.status_parameterized
      oldModel = this
      newModel = new WatchlistItem d
      options = {}
      WatchlistSectionCollections[oldSection].remove oldModel
      WatchlistSectionCollections[newSection].add newModel, options
      WatchlistSectionViews[newSection].renderContents()
      return WatchlistSectionCollections[newSection].get d.id

  WatchlistSectionCollections = {}
  _.each WatchlistSections, (s) ->
    WatchlistSectionCollections[s] = new Backbone.Collection []

  # Views
  WatchlistItemView = Backbone.View.extend
    tagName: "tr"
    template: Hogan.compile $("#WatchlistItemViewTemplate").html()
    dropdownTemplate: Hogan.compile $("#WatchlistDropdownTemplate").html()

    initialize: ->
      _(this).bindAll 'remove', 'change'
      this.model.bind 'remove', this.remove
      this.model.bind 'change', this.change

    remove: ->
      if this.model.get("_dropdownOpen")
        this.hideDropdown()
      this.$el.remove()

    change: ->
      if currentUsersProfile
        if this.model.get("_dropdownOpen")
          this.showDropdown()
        else
          this.hideDropdown()
    
    render: ->
      this.model.set "formattedLastUpdateTime", moment(this.model.get("last_watched")).format('MMMM Do YYYY')
      this.$el.html this.template.render this.model.toJSON()
      that = this
      this.$el.find("td:first").click ->
        that.toggleDropdown()
      this.$el.find("a.click-add").click ->
        that.$el.find("a.click-add").replaceWith $("<i class='icon icon-spin icon-spinner'></i>")
        that.model.update {increment_episodes: true}
      return this
      
    showDropdown: ->
      that = this
      WatchlistSectionCollections[this.model.get("status_parameterized")].find (m) ->
        if m.get("_dropdownOpen") and m.get("_id") != that.model.get("_id")
          m.set "_dropdownOpen", false
      this.$el.after this.dropdownTemplate.render this.model.toJSON()
      this.$dropdown = this.$el.next()

      # Write rating to the dropdown.
      dropdown_ratings = this.$dropdown.find ".rating"
      dropdown_ratings.empty()
      rating = this.model.get("rating")
      if starRatings
        for i in [-2..2]
          star = $("<a class='star' data-rating='" + i + "'></a>")
          if rating.value >= i + 3
            star.append $("<i class='icon-star'></i>")
          else
            star.append $("<i class='icon-star-empty'></i>")
          star.click -> 
            dropdown_ratings.append $("<i class='icon icon-spin icon-spinner'></i>")
            that.model.update {rating: $(this).attr("data-rating")}
          dropdown_ratings.append star
      else
        m = {
          positive: "<span class='positive-smiley'>:)</span>", 
          neutral: "<span class='neutral-smiley'>:|</span>", 
          negative: "<span class='negative-smiley'>:(</span>"
        }
        v = {positive: 2, neutral: 0, negative: -2}
        for t in ['positive', 'neutral', 'negative']
          q = $("<a data-rating='" + v[t] + "'>" + m[t] + "</a>")
          q.click ->
            dropdown_ratings.append $("<i class='icon icon-spin icon-spinner'></i>")
            that.model.update {rating: $(this).attr("data-rating")}
          if rating[t]
            dropdown_ratings.append $("<strong></strong>").append q
          else
            dropdown_ratings.append q

      # Set status and privacy.
      this.$dropdown.find("option[value=" + this.model.get("status_parameterized") + "]").attr("selected", "selected")
      this.$dropdown.find("option[value=" + (if this.model.get("private") then "private" else "public") + "]").attr("selected", "selected")

      that = this
      # Activate "Remove from Library" button.
      this.$dropdown.find(".remove-from-library").click ->
        that.dropdownLoading()

        $.post "/watchlist/remove", {anime_id: that.model.get("anime").slug}, (d) ->
          if d
            status = that.model.get("status_parameterized")
            WatchlistSectionCollections[status].remove that.model
            WatchlistSectionViews[status].renderContents()

      # Submit updates when needed.
      this.$dropdown.find("form.custom").submit -> that.submitDropdownForm()
      this.$dropdown.find("form.custom").change -> that.submitDropdownForm()
    
    dropdownLoading: ->
      $(".opacity-wrapper").addClass("updating")
      $(".updating-icon").removeClass("hide")
        
    submitDropdownForm: ->
      this.dropdownLoading()
      data = {}
      _.each this.$dropdown.find("form.custom").serializeArray(), (x) ->
        data[x.name] = x.value
      this.model.update data
      return false

    hideDropdown: ->
      this.$el.next().slideUp().remove()

    toggleDropdown: ->
      if this.model.get("_dropdownOpen")
        this.model.set "_dropdownOpen", false
      else
        this.model.set "_dropdownOpen", true

  WatchlistSectionViewClass = Backbone.View.extend
    tagName: "div"
    template: Hogan.compile $("#WatchlistSectionViewTemplate").html()
    initialize: ->
      _(this).bindAll 'add'
      this.collection.bind 'add', this.add
    add: (i) ->
      iv = new WatchlistItemView {model: i}
      i.set "_view", iv
    render: ->
      this.$el.html this.template.render()
      $("#table-" + this.options.section + " .library-table").append this.el
      return this
    renderContents: ->
      tbody = $("<tbody class='fake-table-row library-item'></tbody>")
      this.collection.each (i) ->
        tbody.append i.get("_view").render().el
      $("#table-" + this.options.section + " .library-item").replaceWith tbody

  # Bind each WatchlistSectionCollection to corresponding view.
  WatchlistSectionViews = {}
  _.each WatchlistSections, (s) ->
    WatchlistSectionViews[s] = new WatchlistSectionViewClass
      collection: WatchlistSectionCollections[s]
      section: s
    WatchlistSectionViews[s].render()

  lastRender = moment()
  perPage = 50
  @fetchWatchlistSection = (s...) ->
    section = s[0]
    page = if s[1] then s[1] else 1
    watchlist_path = #{user_watchlist_path(@user, format: :json).inspect}
    $.getJSON(watchlist_path + "?list=" + section + "&page=" + page, (d) ->
      models = _.map d, (x) ->
        new WatchlistItem x
      WatchlistSectionCollections[section].set models, {remove: false}
      if d.length > 0
        $("#table-" + section + " .loading-indicator span span").text(page * perPage)
        fetchWatchlistSection section, page+1
      else
        WatchlistSectionViews[section].renderContents()
        $("#table-" + section + " .loading-indicator").hide())
      .error ->
        setTimeout('fetchWatchlistSection("' + section + '", ' + page + ')', 2000)

  _.each WatchlistSections, (s) ->
    fetchWatchlistSection(s)
<commit_msg>Don't push updated item to the end of a list. Fixes #79.<commit_after>- title "#{@user.name}'s Anime Library"

.large-12.columns.watchlist-option-bar
  .large-2.columns
    %p.option-title Anime Library
  .large-9.columns.options
    %ul.status-tabs.inline-list
      %li.active#tab-all= link_to "All", "#all", onclick: "showRelevantSections('all')"
      - Watchlist.valid_statuses.each do |status|
        %li{:id => "tab-" + status.parameterize}= link_to status, "##{status.parameterize}", onclick: "showRelevantSections(#{status.parameterize.inspect})"

- Watchlist.valid_statuses.each do |status|
  .watchlist-row{:id => "table-" + status.parameterize}
    .large-12.columns.library-status-header
      %h5.status= status
    .row
      .large-12.columns.library-table

%script(type="text/template" id="WatchlistSectionViewTemplate")
  %table.large-12.columns.fake-table-row
    %thead
      %tr
        %th{:width => "505"}= link_to "Title", "#"#, :class => "active"
        %th{:width => "95"}= link_to "Progress", "#"
        %th{:width => "68"}= link_to "Rating", "#"
        %th{:width => "65"}= link_to "Type", "#"

    %tbody.fake-table-row.library-item

    %tbody.loading-indicator
      %tr
        %td.center(colspan=4 style="color: #333")
          %i.icon.icon-spin.icon-spinner.icon-2x
          %span.right(style="color: #aaa; padding-top: 10px")
            (Finished loading <span>0</span> entries.)

%script(type="text/template" id="WatchlistItemViewTemplate")
  %td.library-item-title{:width => "505"}
    .relative-wrapper
      %a{:href => "{{anime.url}}"} {{anime.title}}
      {{#private}}
      %span.private-indicator [PRIVATE]
      {{/private}}
      - if @user == current_user
        %i.icon-reorder
  %td.episode-count{:width => "95"}
    .relative-wrapper 
      - if @user == current_user
        %a.click-add
          %i.icon-angle-up
      <span class="edit">{{episodes_watched}}</span> / {{anime.episode_count}}
  %td{:width => "68"} 
    %span.select
      - if @user.star_rating
        %i.icon-star
        {{rating.value}}
      - else
        {{#rating.positive}}
        %span.positive-smiley :)
        {{/rating.positive}}
        {{#rating.neutral}}
        %span.neutral-smiley :|
        {{/rating.neutral}}
        {{#rating.negative}}
        %span.negative-smiley :(
        {{/rating.negative}}
        {{#rating.unknown}}
        %span.unknown-smiley --
        {{/rating.unknown}}
  %td{:width => "65"} {{anime.show_type}}
  
%script(type="text/template" id="WatchlistDropdownTemplate")
  %tr.library-dropdown
    %td{:style => "background: #fafafa;"}(colspan=4)
      .large-8.columns.meta-content
        .large-12.columns.last-update
          %p Last Library Update: {{formattedLastUpdateTime}}
        .large-3.columns.thumbnail
          %img(src="{{anime.cover_image}}")
        
        // Left side of dropdown with thumbnail and description
        .large-9.columns.library-item-info
          %span.title {{anime.title}}
          .rating
          %span.description {{anime.short_synopsis}}
          %span.description-link
            %a(style="color: #fd864b" href="{{anime.url}}") [Read More]

      // Right side of dropdown with update content
      .large-4.columns.action-area
        .opacity-wrapper
          %form.custom
            .large-12.columns.library-status
              .large-3.columns.option-label
                %span Status:
              .large-9.columns.status-dropdown
                %select.medium(name="status")
                  - Watchlist.valid_statuses.each do |status|
                    %option{:value => status.parameterize}= status

            .large-12.columns.episodes-watched
              .large-3.columns.option-label
                %span Watched:
              .large-9.columns.status-dropdown
                .large-6.columns.episode-input
                  %input(name="episodes_watched" type="number" value="{{episodes_watched}}" min="0" max="{{anime.episode_count}}")
                .large-6.columns.end.episode-count
                  %span.postfix Out of {{anime.episode_count}}

            .large-12.columns.privacy-setting
              .large-3.columns.option-label
                %span Privacy:
              .large-9.columns.privacy-dropdown
                %select.medium(name="privacy")
                  %option(value="public") Public
                  %option(value="private") Private

          .large-12.columns.remove-from-library.text-center
            %span
              %i.icon-remove
              %a.remove-from-library Remove From Library
        // Spinner
        %span.updating-icon.hide
          %i.icon-spinner.icon-spin.updating-icon
            
            
:coffee
  starRatings = #{@user.star_rating.inspect}
  currentUsersProfile = #{@user == current_user}

  setActiveTab = (section) ->
    $(".watchlist-option-bar .options li").removeClass "active"
    $(".watchlist-option-bar .options #tab-" + section).addClass "active"

  WatchlistSections = #{Watchlist.valid_statuses.map {|x| x.parameterize }.inspect}
    
  @showRelevantSections = (x...) ->
    section = if x[0] then x[0] else window.location.hash.substring(1)
    if _.contains WatchlistSections, section
      setActiveTab section
      $(".watchlist-row").hide()
      $("#table-" + section).show()
    else
      setActiveTab "all"
      $(".watchlist-row").show()
      
  showRelevantSections()

  # Models and Collections
  WatchlistItem = Backbone.Model.extend
    update: (data) ->
      if currentUsersProfile
        data.anime_id = this.get("anime").slug
        that = this
        $.post "/watchlist/update", data, (d) ->
          newModel = that.updateSelf(d)
          if that.get("_dropdownOpen")
            newModel.set "_dropdownOpen", true
      
    updateSelf: (d) ->
      oldSection = this.get("status_parameterized")
      newSection = d.status_parameterized
      oldModel = this
      newModel = new WatchlistItem d
      options = {}
      if newSection == oldSection
        options.at = WatchlistSectionCollections[oldSection].indexOf oldModel
      WatchlistSectionCollections[oldSection].remove oldModel
      WatchlistSectionCollections[newSection].add newModel, options
      WatchlistSectionViews[newSection].renderContents()
      return WatchlistSectionCollections[newSection].get d.id

  WatchlistSectionCollections = {}
  _.each WatchlistSections, (s) ->
    WatchlistSectionCollections[s] = new Backbone.Collection []

  # Views
  WatchlistItemView = Backbone.View.extend
    tagName: "tr"
    template: Hogan.compile $("#WatchlistItemViewTemplate").html()
    dropdownTemplate: Hogan.compile $("#WatchlistDropdownTemplate").html()

    initialize: ->
      _(this).bindAll 'remove', 'change'
      this.model.bind 'remove', this.remove
      this.model.bind 'change', this.change

    remove: ->
      if this.model.get("_dropdownOpen")
        this.hideDropdown()
      this.$el.remove()

    change: ->
      if currentUsersProfile
        if this.model.get("_dropdownOpen")
          this.showDropdown()
        else
          this.hideDropdown()
    
    render: ->
      this.model.set "formattedLastUpdateTime", moment(this.model.get("last_watched")).format('MMMM Do YYYY')
      this.$el.html this.template.render this.model.toJSON()
      that = this
      this.$el.find("td:first").click ->
        that.toggleDropdown()
      this.$el.find("a.click-add").click ->
        that.$el.find("a.click-add").replaceWith $("<i class='icon icon-spin icon-spinner'></i>")
        that.model.update {increment_episodes: true}
      return this
      
    showDropdown: ->
      that = this
      WatchlistSectionCollections[this.model.get("status_parameterized")].find (m) ->
        if m.get("_dropdownOpen") and m.get("_id") != that.model.get("_id")
          m.set "_dropdownOpen", false
      this.$el.after this.dropdownTemplate.render this.model.toJSON()
      this.$dropdown = this.$el.next()

      # Write rating to the dropdown.
      dropdown_ratings = this.$dropdown.find ".rating"
      dropdown_ratings.empty()
      rating = this.model.get("rating")
      if starRatings
        for i in [-2..2]
          star = $("<a class='star' data-rating='" + i + "'></a>")
          if rating.value >= i + 3
            star.append $("<i class='icon-star'></i>")
          else
            star.append $("<i class='icon-star-empty'></i>")
          star.click -> 
            dropdown_ratings.append $("<i class='icon icon-spin icon-spinner'></i>")
            that.model.update {rating: $(this).attr("data-rating")}
          dropdown_ratings.append star
      else
        m = {
          positive: "<span class='positive-smiley'>:)</span>", 
          neutral: "<span class='neutral-smiley'>:|</span>", 
          negative: "<span class='negative-smiley'>:(</span>"
        }
        v = {positive: 2, neutral: 0, negative: -2}
        for t in ['positive', 'neutral', 'negative']
          q = $("<a data-rating='" + v[t] + "'>" + m[t] + "</a>")
          q.click ->
            dropdown_ratings.append $("<i class='icon icon-spin icon-spinner'></i>")
            that.model.update {rating: $(this).attr("data-rating")}
          if rating[t]
            dropdown_ratings.append $("<strong></strong>").append q
          else
            dropdown_ratings.append q

      # Set status and privacy.
      this.$dropdown.find("option[value=" + this.model.get("status_parameterized") + "]").attr("selected", "selected")
      this.$dropdown.find("option[value=" + (if this.model.get("private") then "private" else "public") + "]").attr("selected", "selected")

      that = this
      # Activate "Remove from Library" button.
      this.$dropdown.find(".remove-from-library").click ->
        that.dropdownLoading()

        $.post "/watchlist/remove", {anime_id: that.model.get("anime").slug}, (d) ->
          if d
            status = that.model.get("status_parameterized")
            WatchlistSectionCollections[status].remove that.model
            WatchlistSectionViews[status].renderContents()

      # Submit updates when needed.
      this.$dropdown.find("form.custom").submit -> that.submitDropdownForm()
      this.$dropdown.find("form.custom").change -> that.submitDropdownForm()
    
    dropdownLoading: ->
      $(".opacity-wrapper").addClass("updating")
      $(".updating-icon").removeClass("hide")
        
    submitDropdownForm: ->
      this.dropdownLoading()
      data = {}
      _.each this.$dropdown.find("form.custom").serializeArray(), (x) ->
        data[x.name] = x.value
      this.model.update data
      return false

    hideDropdown: ->
      this.$el.next().slideUp().remove()

    toggleDropdown: ->
      if this.model.get("_dropdownOpen")
        this.model.set "_dropdownOpen", false
      else
        this.model.set "_dropdownOpen", true

  WatchlistSectionViewClass = Backbone.View.extend
    tagName: "div"
    template: Hogan.compile $("#WatchlistSectionViewTemplate").html()
    initialize: ->
      _(this).bindAll 'add'
      this.collection.bind 'add', this.add
    add: (i) ->
      iv = new WatchlistItemView {model: i}
      i.set "_view", iv
    render: ->
      this.$el.html this.template.render()
      $("#table-" + this.options.section + " .library-table").append this.el
      return this
    renderContents: ->
      tbody = $("<tbody class='fake-table-row library-item'></tbody>")
      this.collection.each (i) ->
        tbody.append i.get("_view").render().el
      $("#table-" + this.options.section + " .library-item").replaceWith tbody

  # Bind each WatchlistSectionCollection to corresponding view.
  WatchlistSectionViews = {}
  _.each WatchlistSections, (s) ->
    WatchlistSectionViews[s] = new WatchlistSectionViewClass
      collection: WatchlistSectionCollections[s]
      section: s
    WatchlistSectionViews[s].render()

  lastRender = moment()
  perPage = 50
  @fetchWatchlistSection = (s...) ->
    section = s[0]
    page = if s[1] then s[1] else 1
    watchlist_path = #{user_watchlist_path(@user, format: :json).inspect}
    $.getJSON(watchlist_path + "?list=" + section + "&page=" + page, (d) ->
      models = _.map d, (x) ->
        new WatchlistItem x
      WatchlistSectionCollections[section].set models, {remove: false}
      if d.length > 0
        $("#table-" + section + " .loading-indicator span span").text(page * perPage)
        fetchWatchlistSection section, page+1
      else
        WatchlistSectionViews[section].renderContents()
        $("#table-" + section + " .loading-indicator").hide())
      .error ->
        setTimeout('fetchWatchlistSection("' + section + '", ' + page + ')', 2000)

  _.each WatchlistSections, (s) ->
    fetchWatchlistSection(s)

{'fraction_non_alphanumeric': 0.15523579871130963, 'fraction_numerical': 0.006799225204569712, 'mean_word_length': 2.4447167755991286, 'pattern_counts': {'":': 0, '<': 59, '<?xml version=': 0, '>': 163, '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': '7131365', 'n_tokens_mistral': 7843, 'n_tokens_neox': 7604, 'n_words': 1387}