<commit_before>(function () {
	function iterator(cols) {
		var p = { x: 0, y: 0 };
		function square() {
			p.x++;
			if (p.x >= cols) {
				p.x = 0;
				p.y++;
			}
		}
		function diag() {
			if (p.y === 0) {
				p.y = p.x + 1;
				p.x = 0;
			} else {
				p.x++;
				p.y--;
			}
		}
		return {
			ptr: function () { return { x: p.x, y: p.y }; },
			step: function () {
				square();

			}
		};
	}
	function placer() {
		var grid = [];
		return function (card, ptr) {
			var c = $(card),
				h = _.reduce(grid[ptr.x] || [], function (m, n) { return m + n; }, 0);
			c.css({ left: ptr.x * 200, top: h });
			if (!grid[ptr.x]) { grid[ptr.x] = []; }
			grid[ptr.x][ptr.y] = c.outerHeight();
		};
	}
	function group() {

		//find all cards
		var cards = $('div.card'),
			width = $(cards[0]).outerWidth(),
			columns = Math.floor($(window).width() / width);
		var sorted = _.sortBy(cards, function (c) { return -$(c).outerHeight(); });
		cards.addClass('absolute');
		var it = iterator(columns > 4 ? 4 : columns),
			place = placer();
		_.each(sorted, function (card) {
			var ptr = it.ptr();
			place(card, ptr);
			it.step();
		});
	}<commit_msg>movies<commit_after>(function () {
	function iterator(cols) {
		var p = { x: 0, y: 0 };
		function square() {
			p.x++;
			if (p.x >= cols) {
				p.x = 0;
				p.y++;
			}
		}
		function diag() {
			if (p.y === 0) {
				p.y = p.x + 1;
				p.x = 0;
			} else {
				p.x++;
				p.y--;
			}
		}
		return {
			ptr: function () { return { x: p.x, y: p.y }; },
			step: function () {
				square();

			}
		};
	}
	function placer() {
		var grid = [];
		return function (card, ptr) {
			var c = $(card),
				h = _.reduce(grid[ptr.x] || [], function (m, n) { return m + n; }, 0);
			c.css({ left: ptr.x * 200, top: h });
			if (!grid[ptr.x]) { grid[ptr.x] = []; }
			grid[ptr.x][ptr.y] = c.outerHeight();
		};
	}
	function group() {

		//find all cards
		var cards = $('div.card'),
			width = $(cards[0]).outerWidth(),
			columns = Math.floor($(window).width() / width);
		var sorted = _.sortBy(cards, function (c) { return -$(c).outerHeight(); });
		cards.addClass('absolute');
		var it = iterator(columns > 4 ? 4 : columns),
			place = placer();
		_.each(cards, function (card) {
			var ptr = it.ptr();
			place(card, ptr);
			it.step();
		});
	}
{'fraction_non_alphanumeric': 0.2322524101665206, 'fraction_numerical': 0.011393514460999123, 'mean_word_length': 2.2754662840746054, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, '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': '5647886', 'n_tokens_mistral': 1097, 'n_tokens_neox': 905, 'n_words': 222}