<commit_before><style type="text/css" media="screen">
body {

  background: #dfdfdf url('images/bg.png') repeat;
  
}
img {
  background-color: #d7d7d7;
}
</style>

<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
<html>
    <body>
    </body>
</html>


<script type="text/javascript">
var images =  []

function gotImages(data) {
  data = shuffle(data)
  
  var arrayLength = data.length;
  var body = $("body")
  var lastImage;
  var zoom = 2;
  
  for (var i = 0; i < arrayLength; i++) {
    
    var datum = data[i]
    var img = $('<img />',{ "data-src": "https://ortastuff.s3.amazonaws.com/images/taptalk/" +datum["path"], height:datum["size"][1] / zoom, width:datum["size"][0] /zoom  });
    img.appendTo(body)

    if ( i == 0 ) {
      lastImage = img
      images.push(img)
      continue
    };
    
    // left or down
    
    var side = Math.floor(Math.random() * 3)
    var lastPosition = $(lastImage).position()
     if(side){      
      img.css({
        position: "absolute",
        left: (lastPosition.left + lastImage.width() + 10),
        top: lastPosition.top 
      })
      
    } else {
      img.css({
        position: "absolute",
        left: lastPosition.left ,
        top: lastPosition.top + lastImage.height() + 10
      })

    }
    
    lastImage = img
    images.push(img)
  }
  scroller()
}

//+ <NAME>
//@ http://jsfromhell.com/array/shuffle [v1.0]
function shuffle(o){ //v1.0
    for(var j, x, i = o.length; i; j = Math.floor(Math.random() * i), x = o[--i], o[i] = o[j], o[j] = x);
    return o;
};


function scrolled() {
  // set the src as you move down
  var arrayLength = images.length;
  for (var i = 0; i < arrayLength; i++) {
    var image = images[i]
    if (isOnScreen(image)) {
      var datasrc = image[0].attributes.getNamedItem("data-src")
      if (datasrc) {
        $(image).attr("src", datasrc.value)
        $(image).removeAttr("data-src")

        images.splice( $.inArray(image, images), 1 );
      }
    }
  }
}

function isOnScreen(element) {
  if(!element) return false;
  var curPos = element.offset();
  var curTop = curPos.top;
  var screenHeight = $(window).scrollTop() + window.innerHeight;
  return (curTop > screenHeight) ? false : true;
}

$( window ).scroll(function() {
  scrolled();
});


</script>

<script src="output.js" type="text/javascript" charset="utf-8"></script>

<commit_msg>bloody iphones<commit_after><style type="text/css" media="screen">
body {

  background: #dfdfdf url('images/bg.png') repeat;
  
}
img {
  background-color: #d7d7d7;
}
</style>

<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
<html>
<head>
  <meta http-equiv="Content-type" content="text/html; charset=utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=0.75">
  
  <title>ortatherox - TapTalks</title>
  
</head>
    <body>
    </body>
</html>


<script type="text/javascript">
var images =  []

function gotImages(data) {
  data = shuffle(data)
  
  var arrayLength = data.length;
  var body = $("body")
  var lastImage;
  var zoom = 2;
  
  for (var i = 0; i < arrayLength; i++) {
    
    var datum = data[i]
    var img = $('<img />',{ "data-src": "https://ortastuff.s3.amazonaws.com/images/taptalk/" +datum["path"], height:datum["size"][1] / zoom, width:datum["size"][0] /zoom  });
    img.appendTo(body)

    if ( i == 0 ) {
      lastImage = img
      images.push(img)
      continue
    };
    
    // left or down
    
    var side = Math.floor(Math.random() * 3)
    var lastPosition = $(lastImage).position()
     if(side){      
      img.css({
        position: "absolute",
        left: (lastPosition.left + lastImage.width() + 10),
        top: lastPosition.top 
      })
      
    } else {
      img.css({
        position: "absolute",
        left: lastPosition.left ,
        top: lastPosition.top + lastImage.height() + 10
      })

    }
    
    lastImage = img
    images.push(img)
  }
  
  scroller()
}

//+ <NAME>
//@ http://jsfromhell.com/array/shuffle [v1.0]
function shuffle(o){ //v1.0
    for(var j, x, i = o.length; i; j = Math.floor(Math.random() * i), x = o[--i], o[i] = o[j], o[j] = x);
    return o;
};


function scrolled() {
  // set the src as you move down
  var arrayLength = images.length;
  for (var i = 0; i < arrayLength; i++) {
    var image = images[i]
    if (isOnScreen(image)) {
      var datasrc = image[0].attributes.getNamedItem("data-src")
      if (datasrc) {
        $(image).attr("src", datasrc.value)
        $(image).removeAttr("data-src")

        images.splice( $.inArray(image, images), 1 );
      }
    }
  }
}

function isOnScreen(element) {
  if(!element) return false;
  var curPos = element.offset();
  var curTop = curPos.top;
  var screenHeight = $(window).scrollTop() + window.innerHeight;
  return (curTop > screenHeight) ? false : true;
}

$( window ).scroll(function() {
  scrolled();
});


</script>

<script src="output.js" type="text/javascript" charset="utf-8"></script>


{'fraction_non_alphanumeric': 0.18129238133226966, 'fraction_numerical': 0.010769844435580374, 'mean_word_length': 2.6340579710144927, 'pattern_counts': {'":': 2, '<': 41, '<?xml version=': 0, '>': 39, 'https://': 2, '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': '5844505', 'n_tokens_mistral': 1851, 'n_tokens_neox': 1795, 'n_words': 385}