<commit_before><% if @game.present? %>
    <div class="fl">
      <h2>
        <a id="create" style="text-decoration: none; color: #000000">Create a new thumbnail experiment for </a>
            <img width="50" height="50" src="<%= @game.send(model_thumb_field) %>"/>
            <label><%= @game.send(model_to_s) %></label>

      </h2>



      <form action=<%= url("start_test") %> method="post" enctype="multipart/form-data">

        <label for="images" class="label" style="font-weight: bold;  font-size: 1.0em; margin-left: 10px">Select
          thumbs</label>
        <input type="file" name="upload[]" id="upload[]" multiple />
        <label><input type="checkbox" name="include_current" checked>Include current thumb in test</label>
        <br/><br/>
        <label for="max_participants" class="label" style="font-weight: bold;  font-size: 1.0em; margin-left: 10px">Participants per alternative:</label>
        <input type="number" name="max_participants" id="max_participants" value="30000"/>
        <br/><br/>
        <input type="submit" value="Begin test" />
        <input type="hidden" value="<%= @game.id %>" name="game_id"/>
      </form>
    </div>

<% end %>

<div class="fl">
  <h2>
    Current Experiments
  </h2>

  <% @current_experiments.each do |exp| %>

      <h3><% if model_thumb_field.present? %>
            <img src="<%= Kernel.const_get(model_name).find(exp.name).send(model_thumb_field) %>" width="50" height="50" />&nbsp;
        <% end %>  <%= Kernel.const_get(model_name).find(exp.name).send(model_to_s) %>&nbsp; <label style="font-weight: normal; font-size: 12px">[<%= exp.max_participants.to_s %> / Alternative]</label> </h3>
      <table>
        <tr>
          <th>Thumb</th>
          <th>Impressions</th>
          <th>Total Clicks</th>
          <th>Good Clicks Score</th>
          <th>Bad Clicks Score</th>
          <th>Total Score</th>
          <th>ctr</th>
          <th></th>
        </tr>
        <% exp.get_sorted_alternatives.each_with_index do |alt, i| %>
            <tr <% if i == 0 %> style="background-color: lemonchiffon" <% end %>>
              <td><img width="50" height="50" src="<%= alt.name %>"/></td>
              <td><%= alt.participant_count %></td>
              <td><%= alt.clicks %></td>
              <td <% if alt.positive_clicks > 0 %> style="color: limegreen; font-weight: bold"  <% end %> > <%= alt.positive_clicks %> </td>
              <td <% if alt.negative_clicks < 0 %> style="color: red; font-weight: bold"  <% end %>><%= alt.negative_clicks %> </td>
              <td <% if alt.negative_clicks < 0 %> style="color: red; font-weight: bold" <% else %> style="color: limegreen; font-weight: bold" <% end %> > <%= alt.positive_clicks + alt.negative_clicks %></td>
              <td><%= '%f%' % (alt.ctr*100) %></td>
              <td><form action="<%= url("choose_alternative") %>" method="post"><input type="submit" value="choose" name="choose_alternative"/><input type="hidden" name="exp_name" value="<%= exp.name %>"/><input type="hidden" name="alt_name" value="<%= alt.name%>"/></form></td>
            </tr>
        <% end %>
      </table>
      <br/>
  <% end %>


</div>

<div class="fl">
  <h2>
    Finished Experiments
  </h2>


  <% @finished_experiments.each do |exp| %>
      <h3><%= Kernel.const_get(model_name).find(exp.game_id).send(model_to_s) %></h3>
      <div style="float: right"><form action="<%= url("delete_test") %>" method="post" ><input type="hidden" name="exp_id" value="<%= exp.id %>"/> <input type="submit" value="Delete"> </form> </div>
      <table>
        <tr>
          <th>Thumb</th>
          <th>Impressions</th>
          <th>Clicks</th>
          <th>ctr</th>
        </tr>
        <% exp.get_sorted_alternatives.each_with_index do |alt, i| %>
            <tr <% if i == 0 %> style="background-color: lemonchiffon" <% end %> >
              <td><img width="50" height="50" src="<%= alt.image %>"/></td>
              <td><%= alt.impressions %></td>
              <td><%= alt.clicks %></td>
              <% if alt.impressions == 0 %>
                  <td>0</td>
              <% else %>
                  <td><%= (alt.clicks.to_f / alt.impressions.to_f * 100).to_s + '%' %></td>
              <% end %>
            </tr>
        <% end %>
      </table>
      <br/>
  <% end %>

</div>
<commit_msg>added positive/negative to finished experiments in index<commit_after><% if @game.present? %>
    <div class="fl">
      <h2>
        <a id="create" style="text-decoration: none; color: #000000">Create a new thumbnail experiment for </a>
            <img width="50" height="50" src="<%= @game.send(model_thumb_field) %>"/>
            <label><%= @game.send(model_to_s) %></label>

      </h2>



      <form action=<%= url("start_test") %> method="post" enctype="multipart/form-data">

        <label for="images" class="label" style="font-weight: bold;  font-size: 1.0em; margin-left: 10px">Select
          thumbs</label>
        <input type="file" name="upload[]" id="upload[]" multiple />
        <label><input type="checkbox" name="include_current" checked>Include current thumb in test</label>
        <br/><br/>
        <label for="max_participants" class="label" style="font-weight: bold;  font-size: 1.0em; margin-left: 10px">Participants per alternative:</label>
        <input type="number" name="max_participants" id="max_participants" value="30000"/>
        <br/><br/>
        <input type="submit" value="Begin test" />
        <input type="hidden" value="<%= @game.id %>" name="game_id"/>
      </form>
    </div>

<% end %>

<div class="fl">
  <h2>
    Current Experiments
  </h2>

  <% @current_experiments.each do |exp| %>

      <h3><% if model_thumb_field.present? %>
            <img src="<%= Kernel.const_get(model_name).find(exp.name).send(model_thumb_field) %>" width="50" height="50" />&nbsp;
        <% end %>  <%= Kernel.const_get(model_name).find(exp.name).send(model_to_s) %>&nbsp; <label style="font-weight: normal; font-size: 12px">[<%= exp.max_participants.to_s %> / Alternative]</label> </h3>
      <table>
        <tr>
          <th>Thumb</th>
          <th>Impressions</th>
          <th>Total Clicks</th>
          <th>Good Clicks Score</th>
          <th>Bad Clicks Score</th>
          <th>Total Score</th>
          <th>ctr</th>
          <th></th>
        </tr>
        <% exp.get_sorted_alternatives.each_with_index do |alt, i| %>
            <tr <% if i == 0 %> style="background-color: lemonchiffon" <% end %>>
              <td><img width="50" height="50" src="<%= alt.name %>"/></td>
              <td><%= alt.participant_count %></td>
              <td><%= alt.clicks %></td>
              <td <% if alt.positive_clicks > 0 %> style="color: limegreen; font-weight: bold"  <% end %> > <%= alt.positive_clicks %> </td>
              <td <% if alt.negative_clicks < 0 %> style="color: red; font-weight: bold"  <% end %>><%= alt.negative_clicks %> </td>
              <td <% if alt.negative_clicks < 0 %> style="color: red; font-weight: bold" <% else %> style="color: limegreen; font-weight: bold" <% end %> > <%= alt.positive_clicks + alt.negative_clicks %></td>
              <td><%= '%f%' % (alt.ctr*100) %></td>
              <td><form action="<%= url("choose_alternative") %>" method="post"><input type="submit" value="choose" name="choose_alternative"/><input type="hidden" name="exp_name" value="<%= exp.name %>"/><input type="hidden" name="alt_name" value="<%= alt.name%>"/></form></td>
            </tr>
        <% end %>
      </table>
      <br/>
  <% end %>


</div>

<div class="fl">
  <h2>
    Finished Experiments
  </h2>


  <% @finished_experiments.each do |exp| %>
      <h3><%= Kernel.const_get(model_name).find(exp.game_id).send(model_to_s) %></h3>
      <div style="float: right"><form action="<%= url("delete_test") %>" method="post" ><input type="hidden" name="exp_id" value="<%= exp.id %>"/> <input type="submit" value="Delete"> </form> </div>
      <table>
        <tr>
          <th>Thumb</th>
          <th>Impressions</th>
          <th>Total Clicks</th>
          <th>Good Clicks Score</th>
          <th>Bad Clicks Score</th>
          <th>Total Score</th>
          <th>ctr</th>
        </tr>
        <% exp.get_sorted_alternatives.each_with_index do |alt, i| %>
            <tr
            <% if i == 0 %> style="background-color: lemonchiffon"
            <% end %> >
              <td><img width="50" height="50" src="<%= alt.image %>"/></td>
              <td><%= alt.impressions %></td>
              <td><%= alt.clicks %></td>
              <td <% if alt.positive_clicks > 0 %> style="color: limegreen; font-weight: bold" <% end %> > <%= alt.positive_clicks %> </td>
              <td <% if alt.negative_clicks < 0 %> style="color: red; font-weight: bold" <% end %>><%= alt.negative_clicks %> </td>
              <td <% if alt.negative_clicks < 0 %> style="color: red; font-weight: bold" <% else %> style="color: limegreen; font-weight: bold" <% end %> > <%= alt.positive_clicks + alt.negative_clicks %></td>
              <% if alt.impressions == 0 %>
                  <td>0</td>
              <% else %>
                  <% if alt.positive_clicks != 0 or alt.negative_clicks != 0 %>
                      <td><%= ((alt.positive_clicks + alt.negative_clicks) / alt.impressions.to_f * 100).to_s + '%' %></td>
                  <% else %>
                      <td><%= (alt.clicks / alt.impressions.to_f * 100).to_s + '%' %></td>
                  <% end %>
              <% end %>
            </tr>
        <% end %>
      </table>
      <br/>
  <% end %>

</div>

{'fraction_non_alphanumeric': 0.20750182844007942, 'fraction_numerical': 0.013373733152230697, 'mean_word_length': 2.4357501794687724, 'pattern_counts': {'":': 0, '<': 373, '<?xml version=': 0, '>': 370, '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': '4905663', 'n_tokens_mistral': 3543, 'n_tokens_neox': 3220, 'n_words': 656}