<commit_before>var coin = loadCoin("res/us/quarter.json");

$(document).ready(function() {
	if ($(window).width() > $(window).height()) {
		$('img#coin').height('75%');
		$('img#coin').height($('img#coin').width());
	} else {
		$('img#coin').width('75%');
		$('img#coin').width($('img#coin').height());
	}
});

$('img#coin').click(function() {
	if (Math.random() < 0.5) {
		$(this).attr('src', coin.headSrc);
	} else {
		$(this).attr('src', coin.tailSrc);
	}
});

function loadCoin(url) {
	jQuery.getJSON(url, function(data) {
		// data is an array of objects
		$.each(data, function(){
			console.log(this.title); // log each title
		});

		return data;
	});
}<commit_msg>update loadCoin()<commit_after>var coin = loadCoin("res/us/quarter.json");

$(document).ready(function() {
	if ($(window).width() > $(window).height()) {
		$('img#coin').height('75%');
		$('img#coin').height($('img#coin').width());
	} else {
		$('img#coin').width('75%');
		$('img#coin').width($('img#coin').height());
	}
});

$('img#coin').click(function() {
	if (Math.random() < 0.5) {
		$(this).attr('src', coin.headSrc);
	} else {
		$(this).attr('src', coin.tailSrc);
	}
});

function loadCoin(url) {
	return $.getJSON(url);
}
{'fraction_non_alphanumeric': 0.29093931837073983, 'fraction_numerical': 0.00997506234413965, 'mean_word_length': 4.816425120772947, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '6973531', 'n_tokens_mistral': 490, 'n_tokens_neox': 459, 'n_words': 65}