<commit_before><% content_for :head do %>
  <%= javascript_tag do %>
    var USERS_BY_DAY_STATISTICS_URL = '<%= users_by_day_statistics_url(:format => :json) %>',
        USERS_BY_TOMATOES_STATISTICS_URL = '<%= users_by_tomatoes_statistics_url(:format => :json) %>',
        TOMATOES_BY_DAY_STATISTICS_URL = '<%= tomatoes_by_day_statistics_url(:format => :json) %>';
  <% end %>
<% end %>

<% content_for :foot do %>
  <%= javascript_include_tag "statistics" %>
<% end %>

<h1>Statistics</h1>

<h2>Users</h2>
<p>
  <%= pluralize(@users, 'user') %><br/>
  about <%= pluralize(@tomatoes/@users, 'tomato') %> per user
</p>

<h2>Users by day</h2>
<div class="chart" id="users_by_day">
  <%= image_tag 'loading.gif', :class => 'loading' %>
</div>

<h2>Users by tomatoes</h2>
<div class="chart" id="users_by_tomatoes">
  <%= image_tag 'loading.gif', :class => 'loading' %>
</div>

<h2>Tomatoes</h2>
<p>
  <%= pluralize(@tomatoes, 'tomato') %><br/>
  about <%= humanize(@tomatoes*Tomato::DURATION) %> of work<br/>
  about <%= number_with_precision(@tomatoes/((Time.zone.now - @first_tomato.created_at) / 3600)) %> tomatoes per hour
</p>

<h2>Tomatoes by day</h2>
<div class="chart" id="tomatoes_by_day">
  <%= image_tag 'loading.gif', :class => 'loading' %>
</div><commit_msg>Hide users by tomatoes chart (to fix)<commit_after><% content_for :head do %>
  <%= javascript_tag do %>
    var USERS_BY_DAY_STATISTICS_URL = '<%= users_by_day_statistics_url(:format => :json) %>',
        USERS_BY_TOMATOES_STATISTICS_URL = '<%= users_by_tomatoes_statistics_url(:format => :json) %>',
        TOMATOES_BY_DAY_STATISTICS_URL = '<%= tomatoes_by_day_statistics_url(:format => :json) %>';
  <% end %>
<% end %>

<% content_for :foot do %>
  <%= javascript_include_tag "statistics" %>
<% end %>

<h1>Statistics</h1>

<h2>Users</h2>
<p>
  <%= pluralize(@users, 'user') %><br/>
  about <%= pluralize(@tomatoes/@users, 'tomato') %> per user
</p>

<h2>Users by day</h2>
<div class="chart" id="users_by_day">
  <%= image_tag 'loading.gif', :class => 'loading' %>
</div>

<!--
<h2>Users by tomatoes</h2>
<div class="chart" id="users_by_tomatoes">
  <%= image_tag 'loading.gif', :class => 'loading' %>
</div>
-->

<h2>Tomatoes</h2>
<p>
  <%= pluralize(@tomatoes, 'tomato') %><br/>
  about <%= humanize(@tomatoes*Tomato::DURATION) %> of work<br/>
  about <%= number_with_precision(@tomatoes/((Time.zone.now - @first_tomato.created_at) / 3600)) %> tomatoes per hour
</p>

<h2>Tomatoes by day</h2>
<div class="chart" id="tomatoes_by_day">
  <%= image_tag 'loading.gif', :class => 'loading' %>
</div>
{'fraction_non_alphanumeric': 0.21431349669389343, 'fraction_numerical': 0.012446518864255154, 'mean_word_length': 5.167865707434053, 'pattern_counts': {'":': 0, '<': 90, '<?xml version=': 0, '>': 102, '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': '802292', 'n_tokens_mistral': 1093, 'n_tokens_neox': 1000, 'n_words': 177}