<commit_before>{% extends 'base.html' %}

{% block styles %}
<link href="/static/css/demo_table.css" rel="stylesheet" type="text/css"/>
<link href="/static/css/srp.css"        rel="stylesheet" type="text/css" />
{% end block %}

{% block content %}

<h1 class="doctors">Search Results Summary: Doctors</h1>
You searched for: {{ search_query }}.
<br/>
Total rows in database: {{ total_cnt }}
Matches: {{ match_cnt }}
<hr/>

<table id="doc_srp_table" class="display" name="doc_srp_table">
  <thead>
    <tr>
      <th>ID</th>
      <th>Title</th>
      <th>Name</th>
      <th>Email</th>
      <th>Phone</th>
      <th>Department</th>
      </tr>
  </thead>

  <tbody>
    {% for res in search_results %}
    <tr>
      <td> {{ res.id }}    </td>
      <td> {{ res.title }} </td>
      <td> {{ res.name }}  </td>
      <td> {{ res.email }} </td>
      <td> {{ res.phone }} </td>
      <td> {{ res.depts[0].name }} </td>
    </tr>
    {% end %}
  </tbody>
</table>

{% end block %}
<commit_msg>Defensive while printing departments<commit_after>{% extends 'base.html' %}

{% block styles %}
<link href="/static/css/dataTables/demo_table.css" rel="stylesheet"
      type="text/css"/>
<link href="/static/css/srp.css"        rel="stylesheet" type="text/css" />
{% end block %}

{% block content %}

<h1 class="doctors">Search Results Summary: Doctors</h1>
You searched for: {{ search_query }}.
<hr/>

<table id="doc_srp_table" class="display" name="doc_srp_table">
  <thead>
    <tr>
      <th>ID</th>
      <th>Title</th>
      <th>Name</th>
      <th>Email</th>
      <th>Phone</th>
      <th>Department</th>
      </tr>
  </thead>

  <tbody>
    {% for res in search_results %}
    <tr>
      <td> {{ res.id }}    </td>
      <td> {{ res.title }} </td>
      <td> {{ res.name }}  </td>
      <td> {{ res.email }} </td>
      <td> {{ res.phone }} </td>
      <td>
	{% if len(res.depts) > 0 %}
	  {{ res.depts[0].name }}
        {% end %}
      </td>
    </tr>
    {% end %}
  </tbody>
</table>

{% end block %}

{'fraction_non_alphanumeric': 0.22521175884404585, 'fraction_numerical': 0.003487792725460887, 'mean_word_length': 2.486111111111111, 'pattern_counts': {'":': 0, '<': 82, '<?xml version=': 0, '>': 83, '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': '4501920', 'n_tokens_mistral': 797, 'n_tokens_neox': 754, 'n_words': 157}