<commit_before>function initMap() {
  var map, mapContainer, marker, position;
  mapContainer = $('#map');
  if (mapContainer.length === 0) {
    return;
  }
  position = {
    lat: Number(45.4654),
    lng: Number(9.1859)
  };
  map = new google.maps.Map(mapContainer[0], {
    center: position,
    zoom: 10
  });
  $.get("api/light_sources", function(light_sources) {
    $.each(light_sources, function(i, light_source) {
      if (light_source.configuration_data == undefined) {
        return;
      }
      marker = new google.maps.Marker({
        position: light_source.configuration_data.position,
        map: map,
        id_light_source: light_source.id
      }).addListener('click', function () {
        $.get("api/light_sources/" + this.id_light_source, function(sensors_data) {
          console.log(sensors_data.first.co2);
          return;
        });
      });
    })
  })
};<commit_msg>Update maps.js.erb<commit_after>function initMap() {
  var map, mapContainer, marker, position;
  mapContainer = $('#map');
  if (mapContainer.length === 0) {
    return;
  }
  position = {
    lat: Number(45.4654),
    lng: Number(9.1859)
  };
  map = new google.maps.Map(mapContainer[0], {
    center: position,
    zoom: 10
  });
  $.get("api/light_sources", function(light_sources) {
    $.each(light_sources, function(i, light_source) {
      if (light_source.configuration_data == undefined) {
        return;
      }
      marker = new google.maps.Marker({
        position: light_source.configuration_data.position,
        map: map,
        id_light_source: light_source.id
      }).addListener('click', function () {
        $.get("api/light_sources/" + this.id_light_source, function(sensors_data) {
          console.log(sensors_data);
        });
      });
    })
  })
};
{'fraction_non_alphanumeric': 0.15019542155220547, 'fraction_numerical': 0.017308766052484645, 'mean_word_length': 2.756813417190776, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '4803671', 'n_tokens_mistral': 592, 'n_tokens_neox': 571, 'n_words': 100}