<commit_before><!DOCTYPE html>
<html>
<head>
<meta charset=utf-8 />
<title>geomorph</title>
<meta name='viewport' content='initial-scale=1,maximum-scale=1,user-scalable=no' />
<script src='https://api.tiles.mapbox.com/mapbox.js/v2.1.9/mapbox.js'></script>
<script src='https://api.tiles.mapbox.com/mapbox.js/plugins/turf/v2.0.0/turf.min.js'></script>
<link href='https://api.tiles.mapbox.com/mapbox.js/v2.1.9/mapbox.css' rel='stylesheet' />
<style>
  body { margin:0; padding:0; }
  #map { position:absolute; top:0; bottom:0; width:100%; }
</style>
<script>
window.onload = function(){
  var geo = {{geojson}}
  if(geo.type === 'Feature') geo = turf.featurecollection([geo])

  L.mapbox.accessToken = '<KEY>';
  var map = L.mapbox.map('map', 'morganherlocker.m63a6il4')

  var features = L.geoJson(geo, { style: L.mapbox.simplestyle.style })

  map.fitBounds(features.getBounds())

  geo.features.forEach(function(feature){
    if(feature.geometry.type === 'Point' || feature.geometry.type === 'MultiPoint') {
      feature.properties['marker-size'] = 'small'
      feature.properties['marker-color'] = '#fff'
    } else if(feature.geometry.type === 'LineString' || feature.geometry.type === 'MultiLineString') {
      feature.properties['stroke'] = '#f0f'
    } else if(feature.geometry.type === 'Polygon' || feature.geometry.type === 'MultiPolygon') {
      feature.properties['stroke'] = '#0ff'
      feature.properties['fill'] = '#0ff'
      feature.properties['fill-opacity'] = 0.1
    }
  })

  var interval = 500
  var f = 0
  var visible = turf.featurecollection([])
  setInterval(function(){
    visible.features.push(geo.features[f])
    map.featureLayer.setGeoJSON(visible)
    f++
    if(f === geo.features.length) {
      f = 0
      visible.features = []
    }
  }, interval)
}
</script>
</head>
<body>




<div id='map'></div>

</body>
</html>
<commit_msg>line animation<commit_after><!DOCTYPE html>
<html>
<head>
<meta charset=utf-8 />
<title>geomorph</title>
<meta name='viewport' content='initial-scale=1,maximum-scale=1,user-scalable=no' />
<script src='https://api.tiles.mapbox.com/mapbox.js/v2.1.9/mapbox.js'></script>
<script src='https://api.tiles.mapbox.com/mapbox.js/plugins/turf/v2.0.0/turf.min.js'></script>
<link href='https://api.tiles.mapbox.com/mapbox.js/v2.1.9/mapbox.css' rel='stylesheet' />
<style>
  body { margin:0; padding:0; }
  #map { position:absolute; top:0; bottom:0; width:100%; }
</style>
<script>
window.onload = function(){
  var geo = {{geojson}}
  if(geo.type === 'Feature') geo = turf.featurecollection([geo])

  L.mapbox.accessToken = '<KEY>';
  var map = L.mapbox.map('map', 'morganherlocker.m63a6il4')

  var features = L.geoJson(geo, { style: L.mapbox.simplestyle.style })

  map.fitBounds(features.getBounds())

  geo.features.forEach(function(feature){
    if(feature.geometry.type === 'Point' || feature.geometry.type === 'MultiPoint') {
      feature.properties['marker-size'] = 'small'
      feature.properties['marker-color'] = '#fff'
    } else if(feature.geometry.type === 'LineString' || feature.geometry.type === 'MultiLineString') {
      feature.properties['stroke'] = '#f0f'
    } else if(feature.geometry.type === 'Polygon' || feature.geometry.type === 'MultiPolygon') {
      feature.properties['stroke'] = '#0ff'
      feature.properties['fill'] = '#0ff'
      feature.properties['fill-opacity'] = 0.1
    }
  })

  var interval = 300
  var f = 0
  var visible = turf.featurecollection([])
  var animating = false
  setInterval(function(){
    var feature = geo.features[f]
    if(!animating){
    if(feature.geometry.type === 'Point' || feature.geometry.type === 'MultiPoint') {
      visible.features.push(feature)
      map.featureLayer.setGeoJSON(visible)
    } else if(feature.geometry.type === 'LineString') {
      animating = true
      visible.features.push(turf.linestring([], feature.properties))
      var id = visible.features.length - 1
      var segment = 0
      var animate = function (i) {
         setTimeout(function () {
            if(!visible.features[id]){
              visible.features[id] = turf.linestring([], feature.properties)
            }
            visible.features[id].geometry.coordinates.push(feature.geometry.coordinates[segment])
            map.featureLayer.setGeoJSON(visible)
            segment++

            if (--i) animate(i)
            else {
              visible.features[id] = feature
              segment = 0
              animating = false
            }
         }, (interval*10) / feature.geometry.coordinates.length)
      }
      animate(feature.geometry.coordinates.length)
      /*setTimeout(function(){
        var setline = setInterval(function(){
          visible.features[id].geometry.coordinates.push(feature.geometry.coordinates[segment])
          map.featureLayer.setGeoJSON(visible)
          segment++
          if(segment === feature.geometry.coordinates.length) {
            clearInterval(setline)
          }
        }, interval / feature.geometry.coordinates.length)
      }, 1000)*/
    } else if(feature.geometry.type === 'MultiLineString') {
      visible.features.push(feature)
      map.featureLayer.setGeoJSON(visible)
    }else if(feature.geometry.type === 'Polygon' || feature.geometry.type === 'MultiPolygon') {
      visible.features.push(feature)
      map.featureLayer.setGeoJSON(visible)
    }
    
    f++
    if(f === geo.features.length) {
      f = 0
      visible.features = []
    }
  }
  }, interval)
}
</script>
</head>
<body>




<div id='map'></div>

</body>
</html>

{'fraction_non_alphanumeric': 0.1773843930635838, 'fraction_numerical': 0.013547687861271676, 'mean_word_length': 3.2331804281345566, 'pattern_counts': {'":': 0, '<': 49, '<?xml version=': 0, '>': 49, 'https://': 6, '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': '4383335', 'n_tokens_mistral': 1887, 'n_tokens_neox': 1812, 'n_words': 280}