<commit_before>- title @run
- short_run = @run.short? || @comparison_run.short?
= render partial: 'twitter_card'

- content_for(:header) do
  h3
    = link_to @run.game, game_path(@run.game), class: 'stealth-link game-link'
    =>
    = link_to @run.category, game_category_path(@run.game, @run.category), class: 'stealth-link category-link'
  h5
    big
      a.stealth-link.run-link.time.needs-formatting class=('short' if @run.short?) href=run_path(@comparison_run) = @comparison_run.duration_milliseconds
    => ' by'
    - if @comparison_run.user.present?
      = link_to @comparison_run.user, user_path(@comparison_run.user), class: 'stealth-link user-link'
      - if @comparison_run.user.silver_patron?
        .gold-split title='Patron'
    - else
      | unknown

- time_scale = [@run.duration_milliseconds, @comparison_run.duration_milliseconds].max
= render partial: 'timeline', locals: {run: @comparison_run, scale_to: time_scale}
hr style='margin: .5em; opacity: 0.25'
= render partial: 'timeline', locals: {run: @run, scale_to: time_scale}

.container
  h5
    big
      a.stealth-link.run-link.time.needs-formatting class=('short' if @run.short?) href=run_path(@run) = @run.duration_milliseconds
    => ' by'
    - if @run.user
      = link_to @run.user, user_path(@run.user), class: 'stealth-link user-link'
      - if @run.user.silver_patron?
        .gold-split title='Patron'
    - else
      | unknown

= render partial: 'timeline_inspector', locals: {run: @comparison_run, scale_to: time_scale, overlap: true}
= render partial: 'timeline_inspector', locals: {run: @run, scale_to: time_scale}

- if @run.belongs_to?(current_user) && @run.improvements_towards(@comparison_run)[:time_differences].present?
  article
    h4 Next goals:
    ul.goals
      - improvements = @run.improvements_towards(@comparison_run)[:time_differences].sort_by { |t| t[:time_difference] }.reverse[0..2]
      - improvements.each do |improvement|
        - timesave = number_to_human(improvement[:time_difference].to_f / 1000, precision: 2, significant: true)
        li Shave #{pluralize(timesave, "second")} off your #{improvement[:split].name}
      - if @run.improvements_towards(@comparison_run)[:missed_splits].present?
        li Stop missing splits
    p
      = 'This will get you to a '
      span.time.needs-formatting class=('short' if @run.short?) = @run.duration_milliseconds - improvements.sum { |i| i[:time_difference] / 2 }
      = ', then we\'ll go from there.'
      - if @comparison_run.user.present?
        p If you need help with strats, #{link_to "watch #{@comparison_run.user.name}", @comparison_run.user.uri.to_s, target: :_blank}!
    p
      small
        | Please note:
        ul
          li If these goals are too big, you may want to look at a rival more similar to yourself.
          li For these goals to make sense, you and your rival have to have similar splitting patterns.
          li While looking at these comparisons, please play #{link_to "this video", "https://www.youtube.com/watch?v=X-S_bSynIUY", target: :_blank} in the background for dramatic effect.<commit_msg>And more<commit_after>- title @run
- short_run = @run.short? || @comparison_run.short?
= render partial: 'twitter_card'

- content_for(:header) do
  h3
    = link_to @run.game, game_path(@run.game), class: 'stealth-link game-link'
    =>
    = link_to @run.category, game_category_path(@run.game, @run.category), class: 'stealth-link category-link'
  h5
    big
      a.stealth-link.run-link.time.needs-formatting class=('short' if @run.short?) href=run_path(@comparison_run) = @comparison_run.duration_milliseconds
    => ' by'
    - if @comparison_run.user.present?
      = link_to @comparison_run.user, user_path(@comparison_run.user), class: 'stealth-link user-link'
      - if @comparison_run.user.silver_patron?
        .gold-split title='Patron'
    - else
      | unknown

- time_scale = [@run.duration_milliseconds, @comparison_run.duration_milliseconds].max
= render partial: 'timeline', locals: {run: @comparison_run, scale_to: time_scale}
hr style='margin: .5em; opacity: 0.25'
= render partial: 'timeline', locals: {run: @run, scale_to: time_scale}

.container
  h5
    big
      a.stealth-link.run-link.time.needs-formatting class=('short' if @run.short?) href=run_path(@run) = @run.duration_milliseconds
    => ' by'
    - if @run.user
      = link_to @run.user, user_path(@run.user), class: 'stealth-link user-link'
      - if @run.user.silver_patron?
        .gold-split title='Patron'
    - else
      | unknown

= render partial: 'timeline_inspector', locals: {run: @comparison_run, scale_to: time_scale, overlap: true}
= render partial: 'timeline_inspector', locals: {run: @run, scale_to: time_scale}

- if @run.belongs_to?(current_user) && @run.improvements_towards(@comparison_run)[:time_differences].present?
  article
    h4 Next goals:
    ul.goals
      - improvements = @run.improvements_towards(@comparison_run)[:time_differences].sort_by { |t| t[:time_difference] }.reverse[0..2]
      - improvements.each do |improvement|
        - timesave = number_to_human(improvement[:time_difference].to_f / 1000, precision: 2, significant: true)
        li Shave #{pluralize(timesave, "second")} off your #{improvement[:split].name}
      - if @run.improvements_towards(@comparison_run)[:missed_splits].present?
        li Stop missing splits
    p
      = 'This will get you to a '
      span class=('short' if @run.short?)
        = format_milliseconds(@run.duration_milliseconds - improvements.sum { |i| i[:time_difference] / 2 })
      = ', then we\'ll go from there.'
      - if @comparison_run.user.present?
        p If you need help with strats, #{link_to "watch #{@comparison_run.user.name}", @comparison_run.user.uri.to_s, target: :_blank}!
    p
      small
        | Please note:
        ul
          li If these goals are too big, you may want to look at a rival more similar to yourself.
          li For these goals to make sense, you and your rival have to have similar splitting patterns.
          li While looking at these comparisons, please play #{link_to "this video", "https://www.youtube.com/watch?v=X-S_bSynIUY", target: :_blank} in the background for dramatic effect.
{'fraction_non_alphanumeric': 0.1319511411121826, 'fraction_numerical': 0.005143040822886531, 'mean_word_length': 3.613046701260193, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 9, 'https://': 2, 'lorem ipsum': 0, 'www.': 2, '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': '7457394', 'n_tokens_mistral': 2121, 'n_tokens_neox': 2019, 'n_words': 494}