<commit_before><!doctype html>
<html>
      <head>
  <meta name="viewport" content="width=device-width,initial-scale=1.0">
  <meta http-equiv="X-UA-Compatible" content = "IE=edge">
  <link href="https://fonts.googleapis.com/css?family=Roboto|Rufina" rel="stylesheet">
  <script src="/js/jquery-1.11.0.js" ></script>
  <script src="/js/financeful.js" ></script>
    <script src="/js/bootstrap.js" ></script>
    <link href="css/bootstrap.min.css" rel="stylesheet">
  <link href="css/bootstrap-theme.min.css" rel="stylesheet">
    <link href="css/financeful.css" rel="stylesheet">
    <link rel="stylesheet" type="text/css" href="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css"> 
  </head>

<body>
<div class = "container">
    <div class="page-header">
      <h1>Financeful</h1>
    </div>

  <div class="dropdown">
    <button class="btn btn-default dropdown-toggle" type="button" id="dropdownMenu1" data-toggle="dropdown" aria-haspopup="true" aria-expanded="true">
      <span class="glyphicon glyphicon-list"></span>
    </button>
    <ul class="dropdown-menu" aria-labelledby="dropdownMenu1">
      <li><a href="{{index}}">Home</a></li>
      <li><a href="{{add_purchase}}">Add Purchase</a></li>
      <li><a href="{{view}}">View Data</a></li>
      <li><a href="{{set}}">Manage Settings</a></li>
      <li><a href="{{login}}">Log Out</a></li>
    </ul>
  </div>

  <br>
  <br>




      <h1 id="history" style="color: white; font-size: 100%" align="center"> History </h1>
      <div class="history_table" style="font-size: 10%">
        <table class="new_table" align="center" style="font-size:10px" id="history_table"  >
     <!-- <div class="elements" align=center style="font-size: 200%; color:black"> -->
      <tr>
        <td> Item 
        <td> Category ` 
        <td> Price
        <td> Date
        <td> Mood
        <td> Would Repurchase?
      </tr>
      <br>

      <div style="color:black">
      <tr>
        {{#each purchases}}
         <td> {{item}} </td>
         <td> {{category}} </td>
         <td> {{price}} </td>  
         <td>{{date}}</td> 
         <td>{{mood}} </td>
         <td>{{trend}} </td>
        <br>
      </tr>                 
        {{/each}}
      </tr>
    </div>
    </div>





</html>  <commit_msg>log of purchases revisions<commit_after><!doctype html>
<html>
      <head>
  <meta name="viewport" content="width=device-width,initial-scale=1.0">
  <meta http-equiv="X-UA-Compatible" content = "IE=edge">
  <link href="https://fonts.googleapis.com/css?family=Roboto|Rufina" rel="stylesheet">
  <script src="/js/jquery-1.11.0.js" ></script>
  <script src="/js/financeful.js" ></script>
    <script src="/js/bootstrap.js" ></script>
    <link href="css/bootstrap.min.css" rel="stylesheet">
  <link href="css/bootstrap-theme.min.css" rel="stylesheet">
    <link href="css/financeful.css" rel="stylesheet">
    <link rel="stylesheet" type="text/css" href="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css"> 
  </head>

<body>
<div class = "container">
    <div class="page-header">
      <h1>Financeful</h1>
    </div>

  <div class="dropdown">
    <button class="btn btn-default dropdown-toggle" type="button" id="dropdownMenu1" data-toggle="dropdown" aria-haspopup="true" aria-expanded="true">
      <span class="glyphicon glyphicon-list"></span>
    </button>
    <ul class="dropdown-menu" aria-labelledby="dropdownMenu1">
      <li><a href="{{index}}">Home</a></li>
      <li><a href="{{add_purchase}}">Add Purchase</a></li>
      <li><a href="{{view}}">View Data</a></li>
      <li><a href="{{set}}">Manage Settings</a></li>
      <li><a href="{{login}}">Log Out</a></li>
    </ul>
  </div>

</div>
  <br>
  <br>

      <div class = "container">
      <label for="filter">Filter</label>
      <select class="selectpicker" id = "filter_sel">
        <option>item</option>
        <option>category</option>
        <option>price</option>
        <option>date</option>
        <option>mood</option>
        <option>repurchase</option>
      </select>

      <input type="text" id="myInput" onkeyup="myFunction()" placeholder="Search for purchases..">
      </div>


      <div class = "container">
      <h1 id="history" style="color: white; font-size: 100%" align="center"> History </h1>
      <div class="table-responsive" style="font-size: 10%">
        <table class="table" align="center" style="font-size:7px" id="my_table">

        <thread>
      <tr>
        <td style ="word-break:break-all;">Item</td>
        <td style ="word-break:break-all;">Category</td>
        <td style ="word-break:break-all;">Price</td>
        <td style ="word-break:break-all;">Date</td>
        <td style ="word-break:break-all;">Mood</td>
        <td style ="word-break:break-all;">Repurchase</td>
      </tr>
      </thread>


      <div style="color:black">
      <tbody>
      <tr>
        {{#each purchases}}
         <td style ="word-break:break-all;"> {{item}} </td>
         <td style ="word-break:break-all;"> {{category}} </td>
         <td style ="word-break:break-all;"> {{price}} </td>  
         <td style ="word-break:break-all;">{{date}}</td> 
         <td style ="word-break:break-all;">{{mood}} </td>
         <td style ="word-break:break-all;">{{trend}} </td>   
      </tr>       
           {{/each}};  
  
    </div>
    </tbody>
    </table>
  </div>
  </div>




<script>
function myFunction() {
    var table, input_data, td, tr, i, j, element, filter, filter_index, num;
    table = document.getElementById("my_table");
    input_data = document.getElementById('myInput')
    td = table.getElementsByTagName("td");
    tr = table.getElementsByTagName("tr");
    filter = input_data.value.toUpperCase();
    filter_index = document.getElementById("filter_sel");
    if (filter_index.value == "item") {
      num = 0;
    }
    if (filter_index.value == "category") {
      num = 1;
    }
    if (filter_index.value == "price") {
      num = 2;
    }
    if (filter_index.value == "date") {
      num = 3;
    }
    if (filter_index.value == "mood") {
      num = 4;
    }

    console.log(filter_index.value);
    for (i = 0; i < tr.length; i++) {
            element = tr[i].getElementsByTagName("td")[num];
            console.log(element);
            if (element.innerHTML.toUpperCase().indexOf(filter) > -1) {
              tr[i].style.display = "";
            } else {
              tr[i].style.display = "none";
            }
    }       

} 
</script>


</html>  
{'fraction_non_alphanumeric': 0.2067953667953668, 'fraction_numerical': 0.008185328185328185, 'mean_word_length': 2.7651162790697676, 'pattern_counts': {'":': 0, '<': 210, '<?xml version=': 0, '>': 210, 'https://': 2, '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': '7025260', 'n_tokens_mistral': 2305, 'n_tokens_neox': 2211, 'n_words': 408}