<commit_before><!doctype html>
<style>
body {
  width: 100%;
  margin: 0px;
  padding: 0px;
  font-family: arial;
  color: #aaa;
}
h1, small {
  margin-top: 20px;
  margin-left: 20px;
}
div.item {
  width: 225px;
  height: 150px;
  margin: 15px;
  border: 5px solid whitesmoke;
  float: left;
}
div.item:hover {
  border: 5px solid black;
}

.img {
  background-size: cover;
  background-repeat: no-repeat;
  width: 100%;
  height: 100%;
}

.link {
  margin: 10px;
}
a, a:visited {
  text-decoration: none;
  color: steelblue;
}
</style>
<script src="./include/d3.js"></script>
<h1>Some Inspiration</h1>
<small>links stolen from <a href="http://techslides.com/over-1000-d3-js-examples-and-demos/">http://techslides.com/over-1000-d3-js-examples-and-demos/</a></small>

<div id="gallery">
</div>

<script>
var get = function(attr) {
  return function(d) { return d[attr]; }
}
var render = function(data) {
  data = data.filter(function(d) {
    return (/^http/.test(d.url) && /^http/.test(d.thumb)) ;
  })
  data.forEach(function(d) {
    d.thumb = "url("+d.thumb+")";
  })

  d3.select("#gallery").selectAll(".item")
      .data(data)
    .enter().append('div').classed('item', true)
    .append('a')
      .attr('href', get('url'))
    .append('div')
      .classed('img', true)
      .style('background-image', get('thumb'))



}




d3.csv("d3gallerydata.csv", function(d) {
  return d;
}, function(err, rows) {
  render(rows);
})


</script><commit_msg>updated website<commit_after><!doctype html>
<style>
body {
  width: 100%;
  margin: 0px;
  padding: 0px;
  font-family: arial;
  color: #aaa;
}
h1, small {
  margin-top: 20px;
  margin-left: 20px;
}
div.item {
  width: 225px;
  height: 150px;
  margin: 15px;
  border: 5px solid whitesmoke;
  float: left;
}
div.item:hover {
  border: 5px solid black;
}

.img {
  background-size: cover;
  background-repeat: no-repeat;
  width: 100%;
  height: 100%;
}

.link {
  margin: 10px;
}
a, a:visited {
  text-decoration: none;
  color: steelblue;
}
</style>
<script src="./include/d3.js"></script>
<h1>Some Inspiration</h1>
<small>links stolen from <a href="http://techslides.com/over-1000-d3-js-examples-and-demos/">http://techslides.com/over-1000-d3-js-examples-and-demos/</a></small>

<div id="gallery">
</div>

<script>
var get = function(attr) {
  return function(d) { return d[attr]; }
}
var render = function(data) {
  data = data.filter(function(d) {
    return (/^http/.test(d.url) && /^http/.test(d.thumb)) ;
  })
  data.forEach(function(d) {
    d.thumb = "url("+d.thumb+")";
  })

  d3.select("#gallery").selectAll(".item")
      .data(data)
    .enter().append('div').classed('item', true)
    .append('a')
      .attr('href', get('url'))
    .append('div')
      .classed('img', true)
      .style('background-image', get('thumb'))



}




d3.csv("./include/d3gallerydata.csv", function(d) {
  return d;
}, function(err, rows) {
  render(rows);
})


</script>
{'fraction_non_alphanumeric': 0.20690834473324213, 'fraction_numerical': 0.030095759233926128, 'mean_word_length': 3.452054794520548, 'pattern_counts': {'":': 0, '<': 33, '<?xml version=': 0, '>': 33, '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': '6667306', 'n_tokens_mistral': 1252, 'n_tokens_neox': 1151, 'n_words': 216}