<commit_before><!DOCTYPE html>
<html>
<head>
  <title>Map</title>
  <link rel="stylesheet" href="http://code.jquery.com/ui/1.11.4/themes/smoothness/jquery-ui.css">
  <link rel="stylesheet" href="http://leafletjs.com/dist/leaflet.css" />
</head>
<body>
  <div>
    <form>
      <input type="textfield" id="q" name="q" placeholder="Search for an address..." style="margin-left: 40px;"></input>
      <input type="textfield" id="country" name="country" value="France"></input>
      <input type="button" id="submit" name="submit" value="Gecode!"></input>
    </form>
  </div>
  <div id="map" style="width: 600px; height: 400px"></div>
  <script src="http://code.jquery.com/jquery-2.1.4.min.js"></script>
  <script src="http://code.jquery.com/ui/1.11.4/jquery-ui.js"></script>
  <script src="http://leafletjs.com/dist/leaflet.js"></script>
  <script>
  var map = L.map('map').setView([44.837778, -0.579197], 13);

  var map_layer_url = 'http://{s}.tiles.mapbox.com/v4/mapbox.streets/{z}/{x}/{y}.png?access_token=<KEY>';
  var map_attribution = 'Map data &copy; <a href="http://openstreetmap.org">OpenStreetMap</a> contributors, Tiles by MapBox';
  L.tileLayer(map_layer_url, {
    maxZoom: 18,
    attribution: map_attribution
  }).addTo(map);

  var markers = [];
  var markersGroup = L.layerGroup();

  $('#submit').click(function() {
    markers.length = 0;
    markersGroup.clearLayers();
    $.ajax({
      url: "http://localhost:8558/0.1/geocode.json?api_key=demo",
      method: 'GET',
      data: {
        country: $('#country').val(),
        query: $('#q').val()
      },
      context: document.body
    }).done(function(resp) {
      if (resp.features.length) {
        resp.features.forEach(function(feat) {
          if (feat.geometry && feat.geometry.coordinates) {
            markers.push(L.marker(feat.geometry.coordinates.reverse())
              .bindPopup('<div>' + feat.properties.geocoding.name + '</div><div>' + feat.properties.geocoding.postcode + ' ' + feat.properties.geocoding.city + '</div><div>Score: ' + feat.properties.geocoding.score.toFixed(2) + '</div>'));
          }<commit_msg>Support case when no postal code #1<commit_after><!DOCTYPE html>
<html>
<head>
  <title>Map</title>
  <link rel="stylesheet" href="http://code.jquery.com/ui/1.11.4/themes/smoothness/jquery-ui.css">
  <link rel="stylesheet" href="http://leafletjs.com/dist/leaflet.css" />
</head>
<body>
  <div>
    <form>
      <input type="textfield" id="q" name="q" placeholder="Search for an address..." style="margin-left: 40px;"></input>
      <input type="textfield" id="country" name="country" value="France"></input>
      <input type="button" id="submit" name="submit" value="Gecode!"></input>
    </form>
  </div>
  <div id="map" style="width: 600px; height: 400px"></div>
  <script src="http://code.jquery.com/jquery-2.1.4.min.js"></script>
  <script src="http://code.jquery.com/ui/1.11.4/jquery-ui.js"></script>
  <script src="http://leafletjs.com/dist/leaflet.js"></script>
  <script>
  var map = L.map('map').setView([44.837778, -0.579197], 13);

  var map_layer_url = 'http://{s}.tiles.mapbox.com/v4/mapbox.streets/{z}/{x}/{y}.png?access_token=<KEY>';
  var map_attribution = 'Map data &copy; <a href="http://openstreetmap.org">OpenStreetMap</a> contributors, Tiles by MapBox';
  L.tileLayer(map_layer_url, {
    maxZoom: 18,
    attribution: map_attribution
  }).addTo(map);

  var markers = [];
  var markersGroup = L.layerGroup();

  $('#submit').click(function() {
    markers.length = 0;
    markersGroup.clearLayers();
    $.ajax({
      url: "http://localhost:8558/0.1/geocode.json?api_key=demo",
      method: 'GET',
      data: {
        country: $('#country').val(),
        query: $('#q').val()
      },
      context: document.body
    }).done(function(resp) {
      if (resp.features.length) {
        resp.features.forEach(function(feat) {
          if (feat.geometry && feat.geometry.coordinates) {
            markers.push(L.marker(feat.geometry.coordinates.reverse())
              .bindPopup('<div>' + feat.properties.geocoding.name + '</div><div>' + (feat.properties.geocoding.postcode || '') + ' ' + feat.properties.geocoding.city + '</div><div>Score: ' + feat.properties.geocoding.score.toFixed(2) + '</div>'));
          }
{'fraction_non_alphanumeric': 0.21039022096850024, 'fraction_numerical': 0.02233192289609779, 'mean_word_length': 3.5410885805763073, 'pattern_counts': {'":': 0, '<': 77, '<?xml version=': 0, '>': 77, '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': '7273807', 'n_tokens_mistral': 1568, 'n_tokens_neox': 1489, 'n_words': 230}