<commit_before>function PhotoLayerCallback(json, panoLayer) {
  this.panoLayer = panoLayer;
  var photos = this.getPhotos(json);
  if (!photos) return;
  var batch = [];
 for (var i = 0; i < photos.length; i++) {
    var photo = photos[i];
    if (!panoLayer.ids[this.getId(photo)]) {
      var marker = this.createMarker(photo, panoLayer.markerIcon);
      panoLayer.ids[this.getId(photo)] = "exists";
      batch.push(marker);
    } else {
      console.log("already saw");
    }
  }
  panoLayer.mgr.addMarkers(batch, panoLayer.map.getZoom());
  panoLayer.mgr.refresh();
}

PhotoLayerCallback.prototype.getPhotos = function(json) {
  return (json.feed && json.feed.entry) || (json.photos && json.photos.photo);
}

PhotoLayerCallback.prototype.getId = function(photo) {
  return (photo.id && photo.id.$t) || (photo.id);
}<commit_msg>Adding ugly photo layer example<commit_after>function PhotoLayerCallback(json, panoLayer) {
  this.panoLayer = panoLayer;
  var photos = this.getPhotos(json);
  if (!photos) return;
  var batch = [];
 for (var i = 0; i < photos.length; i++) {
    var photo = photos[i];
    if (!panoLayer.ids[this.getId(photo)]) {
      var marker = this.createMarker(photo, panoLayer.markerIcon);
      panoLayer.ids[this.getId(photo)] = "exists";
      batch.push(marker);
    } 
  }
  panoLayer.mgr.addMarkers(batch, panoLayer.map.getZoom());
  panoLayer.mgr.refresh();
}

PhotoLayerCallback.prototype.getPhotos = function(json) {
  return (json.feed && json.feed.entry) || (json.photos && json.photos.photo);
}

PhotoLayerCallback.prototype.getId = function(photo) {
  return (photo.id && photo.id.$t) || (photo.id);
}
{'fraction_non_alphanumeric': 0.16463414634146342, 'fraction_numerical': 0.0012195121951219512, 'mean_word_length': 3.9727272727272727, 'pattern_counts': {'":': 0, '<': 5, '<?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': '1648045', 'n_tokens_mistral': 572, 'n_tokens_neox': 565, 'n_words': 103}