<commit_before>$(function () {
	var DURATION = .5, // in seconds
		show_image = function () {
			var $this = $(this);
			// if css transitions work, just swap the opacity, otherwise fall back to jQuery animation
			if (Modernizr.csstransitions) {
				$this.css('opacity', 1);
			} else {
				$this.animate({'opacity': 1}, DURATION);
			}
		},
		transition_key = Modernizr.prefixed('transition'),
		img_css_dict = {};
	
	// Prepare each image's initial CSS
	img_css_dict[transition_key] = "opacity linear " + DURATION + "s";
	img_css_dict['opacity'] = 0;
	
	// Set each image's initial CSS
	$('img').css(img_css_dict);
	// Set the load event for each image
	$('img').on('load', show_image);
});<commit_msg>Fixed a bug where images would sometimes fail to appear if the browser had not cached them.<commit_after>$(function () {
	var DURATION = .5, // in seconds
		show_image = function () {
			var $this = $(this);
			// if css transitions work, just swap the opacity, otherwise fall back to jQuery animation
			if (Modernizr.csstransitions) {
				$this.css('opacity', 1);
			} else {
				$this.animate({'opacity': 1}, DURATION);
			}
		},
		transition_key = Modernizr.prefixed('transition'),
		img_css_dict = {};
	
	// Prepare each image's initial CSS
	img_css_dict[transition_key] = "opacity linear " + DURATION + "s";
	img_css_dict['opacity'] = 0;
	
	// Set each image's initial CSS
	$('img').each(function () {
		var $this = $(this);
		if (!this.complete) $this.css(img_css_dict);
	});
	// Set the load event for each image
	$('img').on('load', show_image);
});
{'fraction_non_alphanumeric': 0.15866922584772872, 'fraction_numerical': 0.005118362124120281, 'mean_word_length': 3.7250755287009065, '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': '1882456', 'n_tokens_mistral': 579, 'n_tokens_neox': 514, 'n_words': 148}