<commit_before><%inherit file="base.mako"/>
<%def name="title()">Search</%def>
<%def name="content()">
<section id="Search" xmlns="http://www.w3.org/1999/html">
  <div class="page-header">
    % if query or tags:
      <h1>
        % if query == '*' and not tags:
          Showing all<small>
        % else:
          Search <small> for
##        first show query, if it is there
          % if query:
            <span class="label label-success btn-mini" style="margin-right:.5em">${query}
              <a href="/search/?type=${type}&tags=${','.join(tags)}" style="color:white">&times;</a>
            </span>
          % endif
##        then show tags
          % if tags:
            % for tag in tags:
              <span class="label label-info btn-mini" style="margin-right:.5em">${tag}
                <a href="/search/?q=${query if query != '*' else ''}&type=${type}&tags=${','.join((x for x in tags if x != tag)) | h }" style="color:white">&times;</a>
              </span>
            % endfor
          % endif
        % endif
        <br>
##      number of results returned and the time it took
        ${total} result${'s' if total is not 1 else ''} in ${time} seconds</small>
      </h1>
    % else:
      <h1>No query</h1>
    % endif
  </div><!-- end page-header -->
</section>
<div class="row">
  <div class="col-md-3">
    % if (query or tags) and isinstance(counts, dict):
      <ul class="nav nav-pills nav-stacked search-types">
        <li class="${'active' if type == '' else ''}"><a href="/search/?q=${query}&tags=${','.join(tags)}">All: ${counts['all']}</a></li>
        <li class="${'active' if type == 'user' else ''}"><a href="/search/?q=${query}&tags=${','.join(tags)}&type=user">Users: ${counts['users']}</a></li>
        <li class="${'active' if type == 'project' else ''}"><a href="/search/?q=${query}&tags=${','.join(tags)}&type=project">Projects: ${counts['projects']}</a></li>
        <li class="${'active' if type == 'component' else ''}"><a href="/search/?q=${query}&tags=${','.join(tags)}&type=component">Components: ${counts['components']}</a></li>
        <li class="${'active' if type == 'registration' else ''}"><a href="/search/?q=${query}&tags=${','.join(tags)}&type=registration">Registrations: ${counts['registrations']}</a></li>
      </ul>
    % endif
##  our tag cloud!
    % if cloud:
      <div class="panel panel-default" style="margin-top: 20px; margin-bottom: 20px">
        <div class="panel-heading cloud">
          <h3> Improve Your Search:</h3>
        </div>
        <div class="panel-body">
          % for key, value in cloud.iteritems():
            % if not key in tags:
              <span id="tagCloud">
                <a href="/search/?q=${query}&type=${type}&tags=${','.join(tags) + ',' + key}" rel=${value}> ${key} </a>
              </span>
            % endif
          % endfor
        </div>
      </div>
    % endif
  </div><!-- end col-md -->
  <div class="col-md-9">
    % if results:
##    iterate through our nice lists of results
      <div class="list-group">
        % for result in results:
          <div class="list-group-item">
##          users are different results than anything associated with projects<commit_msg>add initial overflow handling<commit_after><%inherit file="base.mako"/>
<%def name="title()">Search</%def>
<%def name="content()">
<section id="Search" xmlns="http://www.w3.org/1999/html" style="overflow: hidden">
  <div class="page-header">
    % if query or tags:
      <h1>
        % if query == '*' and not tags:
          Showing all<small>
        % else:
          Search <small> for
##        first show query, if it is there
          % if query:
            <span class="label label-success btn-mini" style="margin-right:.5em">${query}
              <a href="/search/?type=${type}&tags=${','.join(tags)}" style="color:white">&times;</a>
            </span>
          % endif
##        then show tags
          % if tags:
            % for tag in tags:
              <span class="label label-info btn-mini" style="margin-right:.5em">${tag}
                <a href="/search/?q=${query if query != '*' else ''}&type=${type}&tags=${','.join((x for x in tags if x != tag)) | h }" style="color:white">&times;</a>
              </span>
            % endfor
          % endif
        % endif
        <br>
##      number of results returned and the time it took
        ${total} result${'s' if total is not 1 else ''} in ${time} seconds</small>
      </h1>
    % else:
      <h1>No query</h1>
    % endif
  </div><!-- end page-header -->
</section>
<div class="row">
  <div class="col-md-3">
    % if (query or tags) and isinstance(counts, dict):
      <ul class="nav nav-pills nav-stacked search-types">
        <li class="${'active' if type == '' else ''}"><a href="/search/?q=${query}&tags=${','.join(tags)}">All: ${counts['all']}</a></li>
        <li class="${'active' if type == 'user' else ''}"><a href="/search/?q=${query}&tags=${','.join(tags)}&type=user">Users: ${counts['users']}</a></li>
        <li class="${'active' if type == 'project' else ''}"><a href="/search/?q=${query}&tags=${','.join(tags)}&type=project">Projects: ${counts['projects']}</a></li>
        <li class="${'active' if type == 'component' else ''}"><a href="/search/?q=${query}&tags=${','.join(tags)}&type=component">Components: ${counts['components']}</a></li>
        <li class="${'active' if type == 'registration' else ''}"><a href="/search/?q=${query}&tags=${','.join(tags)}&type=registration">Registrations: ${counts['registrations']}</a></li>
      </ul>
    % endif
##  our tag cloud!
    % if cloud:
      <div class="panel panel-default" style="margin-top: 20px; margin-bottom: 20px">
        <div class="panel-heading cloud">
          <h3> Improve Your Search:</h3>
        </div>
        <div class="panel-body" style="overflow: hidden">
          % for key, value in cloud.iteritems():
            % if not key in tags:
              <span id="tagCloud">
                <a href="/search/?q=${query}&type=${type}&tags=${','.join(tags) + ',' + key}" rel=${value}> ${key} </a>
              </span>
            % endif
          % endfor
        </div>
      </div>
    % endif
  </div><!-- end col-md -->
  <div class="col-md-9">
    % if results:
##    iterate through our nice lists of results
      <div class="list-group" style="overflow: hidden">
        % for result in results:
          <div class="list-group-item">
##          users are different results than anything associated with projects
{'fraction_non_alphanumeric': 0.2167563412759416, 'fraction_numerical': 0.006149116064565719, 'mean_word_length': 2.574725274725275, 'pattern_counts': {'":': 0, '<': 135, '<?xml version=': 0, '>': 135, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 2}, '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': '6693651', 'n_tokens_mistral': 2084, 'n_tokens_neox': 2005, 'n_words': 504}