<commit_before><%= javascript_include_tag 'flot/excanvas.min.js' -%>
<%= javascript_include_tag 'jquery-1.5.1.min.js' -%>
<%= javascript_include_tag 'flot/jquery.flot.js' -%>
<%= javascript_include_tag 'flot/curvedLines.js' -%>

<%= stylesheet_link_tag "match_making" -%>

<%
   data_files = @matching_data_files.collect do |mdf|
     DataFile.find(mdf.primary_key)
   end
   authorized_data_files = DataFile.authorized_partial_asset_collection(data_files, 'view', current_user)
   authorized_data_file_ids = authorized_data_files.collect(&:id)
   authorized_matching_data_files = @matching_data_files.select { |mdf| authorized_data_file_ids.include?(mdf.primary_key.to_i) }
   hidden_items = data_files - authorized_data_files
   hidden_count = hidden_items.count

   limit ||= 4
   limit_matching_data_files = authorized_matching_data_files[0..limit]
   extra_count = authorized_matching_data_files.size - limit
%>

<div class="contribution_title">
  <h1>Data that may be of interest to <%= link_to h(@model.title), @model -%></h1>
</div>

<div class="show_basic">
  There are totally <span style="font-weight:bold"><%= @matching_data_files.count -%></span> data files matched,
  <span style="font-weight:bold"><%= hidden_count %></span> are
  hidden

  <%= render :partial => "matching_data_item", :locals => {:matching_data_items => limit_matching_data_files} -%>

  <ul class="matching_data_items">
    <% unless extra_count < 1 %>
        <li class="matching_data_item">
          <%= link_to_remote "View all "+(authorized_matching_data_files.size).to_s+" matched data files", :html => {:id => "view_matched_data_files_and_extra", :style => "display:block"},
                             :url => url_for(:controller => 'models', :action => 'view_matched_data_files'),
                             :with => "'primary_keys=' + '#{authorized_matching_data_files.collect(&:primary_key).join(",")}'
                                    + '&scores=' + '#{authorized_matching_data_files.collect(&:score).join(",")}'
                                    + '&search_terms=' + '#{authorized_matching_data_files.collect(&:search_terms).collect { |t| t.join('*') }.join(',')}'",
                             :before => "show_large_ajax_loader('matching_data_ajax_loader')"
          -%>
          <%= link_to_remote "View " + limit_matching_data_files.size.to_s + " matched data files", :html => {:id => "view_matched_data_files", :style => "display:none"},
                             :url => url_for(:controller => 'models', :action => 'view_matched_data_files'),
                             :with => "'primary_keys=' + '#{limit_matching_data_files.collect(&:primary_key).join(",")}'
                         + '&scores=' + '#{limit_matching_data_files.collect(&:score).join(",")}'
                         + '&search_terms=' + '#{limit_matching_data_files.collect(&:search_terms).collect { |t| t.join('*') }.join(',')}'",
                             :before => "show_large_ajax_loader('matching_data_ajax_loader')"
          -%>
        </li>
    <% end %>

    <% unless hidden_count < 1 %>
        <li class="matching_data_item">
           <%= render :partial => "assets/hidden_items", :object => hidden_items -%>
        </li>
    <% end %>
  </ul>
</div><commit_msg>small tweak<commit_after><%= javascript_include_tag 'flot/excanvas.min.js' -%>
<%= javascript_include_tag 'jquery-1.5.1.min.js' -%>
<%= javascript_include_tag 'flot/jquery.flot.js' -%>
<%= javascript_include_tag 'flot/curvedLines.js' -%>

<%= stylesheet_link_tag "match_making" -%>

<%
   data_files = @matching_data_files.collect do |mdf|
     DataFile.find(mdf.primary_key)
   end
   authorized_data_files = DataFile.authorized_partial_asset_collection(data_files, 'view', current_user)
   authorized_data_file_ids = authorized_data_files.collect(&:id)
   authorized_matching_data_files = @matching_data_files.select { |mdf| authorized_data_file_ids.include?(mdf.primary_key.to_i) }
   hidden_items = data_files - authorized_data_files
   hidden_count = hidden_items.count

   limit ||= 4
   limit_matching_data_files = authorized_matching_data_files[0..limit]
   extra_count = authorized_matching_data_files.size - limit
%>

<div class="contribution_title">
  <h1>Data that may be of interest to <%= link_to h(@model.title), @model -%></h1>
</div>

<div class="show_basic">
  There are totally <span style="font-weight:bold"><%= @matching_data_files.count -%></span> data files matched,
  <span style="font-weight:bold"><%= hidden_count %></span> are
  hidden

  <%= render :partial => "matching_data_item", :locals => {:matching_data_items => limit_matching_data_files} -%>

  <ul class="matching_data_items">
    <% unless extra_count < 1 %>
        <li class="matching_data_item">
          <%= link_to_remote "View all "+(authorized_matching_data_files.size).to_s+" matched items", :html => {:id => "view_matched_data_files_and_extra", :style => "display:block"},
                             :url => url_for(:controller => 'models', :action => 'view_matched_data_files'),
                             :with => "'primary_keys=' + '#{authorized_matching_data_files.collect(&:primary_key).join(",")}'
                                    + '&scores=' + '#{authorized_matching_data_files.collect(&:score).join(",")}'
                                    + '&search_terms=' + '#{authorized_matching_data_files.collect(&:search_terms).collect { |t| t.join('*') }.join(',')}'",
                             :before => "show_large_ajax_loader('matching_data_ajax_loader')"
          -%>
          <%= link_to_remote "View " + limit_matching_data_files.size.to_s + " matched items", :html => {:id => "view_matched_data_files", :style => "display:none"},
                             :url => url_for(:controller => 'models', :action => 'view_matched_data_files'),
                             :with => "'primary_keys=' + '#{limit_matching_data_files.collect(&:primary_key).join(",")}'
                         + '&scores=' + '#{limit_matching_data_files.collect(&:score).join(",")}'
                         + '&search_terms=' + '#{limit_matching_data_files.collect(&:search_terms).collect { |t| t.join('*') }.join(',')}'",
                             :before => "show_large_ajax_loader('matching_data_ajax_loader')"
          -%>
        </li>
    <% end %>

    <% unless hidden_count < 1 %>
        <li class="matching_data_item">
           <%= render :partial => "assets/hidden_items", :object => hidden_items -%>
        </li>
    <% end %>
  </ul>
</div>
{'fraction_non_alphanumeric': 0.16482843137254902, 'fraction_numerical': 0.0027573529411764708, 'mean_word_length': 3.295394736842105, 'pattern_counts': {'":': 0, '<': 73, '<?xml version=': 0, '>': 111, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '808502', 'n_tokens_mistral': 2190, 'n_tokens_neox': 2046, 'n_words': 312}