<commit_before><!DOCTYPE html>
<html>
  <head>
    <meta name="viewport" content="initial-scale=1.0, user-scalable=no">
    <meta charset="utf-8">
    <style>
      html, body {
        padding: 20px;
        font-size: 18px;
        font-family: Verdana;
      }
      select, input {
        display: block;
        margin-bottom: 1em;
        max-width: 400px;
        border: 1px #999 solid;
        padding: 0.2em;
        font-size: 1em;
      }
    </style>
    <title>City autocomplete field powered by Google</title>
    <script src="https://maps.googleapis.com/maps/api/js?v=3.exp&signed_in=true&libraries=places"></script>
    <script>

    function initialize() {

      var input = document.querySelector('#input');
      var results = document.querySelector('#results');
      var country = document.querySelector('#country');

      var getSuggestions = function (text, callback) {
        if(text === '') return callback([]);

        var service = new google.maps.places.AutocompleteService();
        var request = {};
        request.input = text;
        request.componentRestrictions = { country: country.value };
        request.types = ['(cities)'];
        service.getPlacePredictions(request, callback);
      }

      input.addEventListener('keyup', function (e) {
        e && e.preventDefault();
        getSuggestions(input.value, function (predictions) {
          console.clear();
          console.log(JSON.stringify(predictions, null, 2));
          results.innerHTML = predictions.map (function(p) {
            return {
              description: p.description,
              place_id: p.place_id
            }
          }).map(function (city) {
            return '<a href="javascript:getLocation(\'' + city.place_id + '\');">' + city.description + '</a>';
          }).join('<br />');
        })
      });
      input.focus();

    }

    function getLocation (place_id) {

    }

    google.maps.event.addDomListener(window, 'load', initialize);

    </script>
  </head>
  <body>
    <select id="country">
      <option value=""></option><commit_msg>Covering the no-matches case<commit_after><!DOCTYPE html>
<html>
  <head>
    <meta name="viewport" content="initial-scale=1.0, user-scalable=no">
    <meta charset="utf-8">
    <style>
      html, body {
        padding: 20px;
        font-size: 18px;
        font-family: Verdana;
      }
      select, input {
        display: block;
        margin-bottom: 1em;
        max-width: 400px;
        border: 1px #999 solid;
        padding: 0.2em;
        font-size: 1em;
      }
    </style>
    <title>City autocomplete field powered by Google</title>
    <script src="https://maps.googleapis.com/maps/api/js?v=3.exp&signed_in=true&libraries=places"></script>
    <script>

    function initialize() {

      var input = document.querySelector('#input');
      var results = document.querySelector('#results');
      var country = document.querySelector('#country');

      var getSuggestions = function (text, callback) {
        if(text === '') return callback([]);

        var service = new google.maps.places.AutocompleteService();
        var request = {};
        request.input = text;
        request.componentRestrictions = { country: country.value };
        request.types = ['(cities)'];
        service.getPlacePredictions(request, callback);
      }

      input.addEventListener('keyup', function (e) {
        e && e.preventDefault();
        getSuggestions(input.value, function (predictions) {
          if (predictions === null || predictions.length === 0) {
            results.innerHTML = 'No matches. Sorry.'
            return;
          }
          console.clear();
          console.log(JSON.stringify(predictions, null, 2));
          results.innerHTML = predictions.map (function(p) {
            return {
              description: p.description,
              place_id: p.place_id
            }
          }).map(function (city) {
            return '<a href="javascript:getLocation(\'' + city.place_id + '\');">' + city.description + '</a>';
          }).join('<br />');
        })
      });
      input.focus();

    }

    function getLocation (place_id) {

    }

    google.maps.event.addDomListener(window, 'load', initialize);

    </script>
  </head>
  <body>
    <select id="country">
      <option value=""></option>
{'fraction_non_alphanumeric': 0.14993090741593734, 'fraction_numerical': 0.009442653155228006, 'mean_word_length': 2.2483171278982796, 'pattern_counts': {'":': 0, '<': 45, '<?xml version=': 0, '>': 45, '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': '5160246', 'n_tokens_mistral': 1295, 'n_tokens_neox': 1234, 'n_words': 256}