<commit_before><div class="page-header">
  <div class="pull-right">
    <% if @keg.active? %>
    <%= link_to 'Untap Keg', [:admin, @keg, :tap], method: :delete, class: 'btn btn-danger' %>
    <% else %>
    <%= link_to 'Tap Keg', [:admin, @keg, :tap], class: 'btn btn-primary' %>
    <% end %>
    <%= link_to 'Edit', [:edit, :admin, @keg], class: 'btn btn-default' %>
  </div>
  <h1>Admin Keg: <%= @keg.name %></h1>
</div>

<h3>Stats</h3>
<table class="table-striped" id="stats">
  <tr>
    <td>Poured</td>
    <td class="poured"><%= @keg.poured.round %> oz</td>
  </tr>
  <tr>
    <td>Remaining</td>
    <td class="remaining"><%= @keg.remaining.round%> oz</td>
  </tr>
  <tr>
    <td>Pours</td>
    <td class="pours"><%= @keg.completed_pours.size %></td>
  </tr>
  <tr>
    <td>Average pour volume</td>
    <td class="average-pour-volume"><%= "%0.1f" % @keg.completed_pours.average(:volume).to_f %> oz</td>
  </tr>
  <% if @keg.completed_pours.any? %>
  <tr>
    <td>Projected empty date</td>
    <td class="projected-empty-date"><%= @keg.projected_empty.strftime("%a, %b %d") %></td>
  </tr>
  <tr>
    <td>Days until empty</td>
    <td class="days-until-empty"><%= (@keg.projected_empty - Time.current).to_i / 1.day %></td>
  </tr>
  <% end %>
</table>

<h3>Recent Pours</h3>
<%= render 'admin/pours/table', pours: @keg.pours.for_listing.limit(15) %>
<commit_msg>More useful past keg info<commit_after><div class="page-header">
  <div class="pull-right">
    <% if @keg.active? %>
    <%= link_to 'Untap Keg', [:admin, @keg, :tap], method: :delete, class: 'btn btn-danger' %>
    <% else %>
    <%= link_to 'Tap Keg', [:admin, @keg, :tap], class: 'btn btn-primary' %>
    <% end %>
    <%= link_to 'Edit', [:edit, :admin, @keg], class: 'btn btn-default' %>
  </div>
  <h1>Admin Keg: <%= @keg.name %></h1>
</div>

<h3>Stats</h3>
<table class="table-striped" id="stats">
  <tr>
    <td>Poured</td>
    <td class="poured"><%= @keg.poured.round %> oz</td>
  </tr>
  <tr>
    <td>Remaining</td>
    <td class="remaining"><%= @keg.remaining.round%> oz</td>
  </tr>
  <tr>
    <td>Pours</td>
    <td class="pours"><%= @keg.completed_pours.size %></td>
  </tr>
  <tr>
    <td>Average pour volume</td>
    <td class="average-pour-volume"><%= "%0.1f" % @keg.completed_pours.average(:volume).to_f %> oz</td>
  </tr>
  <% if @keg.completed_pours.any? && @keg.active? %>
  <tr>
    <td>Projected empty date</td>
    <td class="projected-empty-date"><%= @keg.projected_empty.strftime("%a, %b %d") %></td>
  </tr>
  <tr>
    <td>Days until empty</td>
    <td class="days-until-empty"><%= (@keg.projected_empty - Time.current).to_i / 1.day %></td>
  </tr>
  <% end %>
  <% if @keg.started_at %>
  <tr>
    <td>Started at</td>
    <td><%= l(@keg.started_at, format: :norm) %></td>
  </tr>
  <% end %>
  <% if @keg.finished_at %>
  <tr>
    <td>Finished at</td>
    <td><%= l(@keg.finished_at, format: :norm) %></td>
  </tr>
  <% end %>
</table>

<h3>Recent Pours</h3>
<%= render 'admin/pours/table', pours: @keg.pours.for_listing.limit(15) %>

{'fraction_non_alphanumeric': 0.255691191026064, 'fraction_numerical': 0.007258330583965688, 'mean_word_length': 3.3942028985507244, 'pattern_counts': {'":': 0, '<': 149, '<?xml version=': 0, '>': 149, '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': '3848456', 'n_tokens_mistral': 1403, 'n_tokens_neox': 1302, 'n_words': 247}