<commit_before>var doc = document,
	TRANSFORM = 'rotateX(-25deg) rotateY(-45deg) translate3d(Apx,Bpx,0)',
	appendChild = 'appendChild',
	wrap = doc.body[appendChild](createDiv('wrap')),
	cells = [],
	x = 0,
	y,
	OFFSET_X = 0,
	OFFSET_Y = 0,
	ROWS = 6,
	COLUMNS = 6;





for(x; x < ROWS; x++) {

	for(y = 0; y < COLUMNS; y++) {

		cells.push(createCell(x,y));
	}
}

function createCell(x,y) {

	var sides = ['front','back','top','bottom','left','right'],
		container = wrap[appendChild](createDiv('cube cube-'+x+y));

	container.x = x;
	container.y = y;

	var _x = x*59.5 - y*59;
	var _y = y*39;

	var transform = TRANSFORM.replace('A',_x).replace('B',_y);
	console.log('x: ' + x + ', y: ' + y, transform);
	container.style.transform = transform;

	while(sides.length) {
		container[appendChild](createDiv(sides.shift()));
	}

	return container;
}

/**
 *
 * @param className
 * @returns {Element}
 */
function createDiv(className) {

	var div = doc.createElement('div');
	div.className = className;

	return div;
}<commit_msg>Added somewhat minified way for cell selection<commit_after>var doc = document,
	TRANSFORM = 'rotateX(-25deg) rotateY(-45deg) translate3d(Apx,Bpx,0)',
	ACTIVE_CLASS = appendChild = 'appendChild',
	wrap = doc.body[appendChild](createDiv('wrap')),
	hoverCss='',
	cells = {},
	x = 0,
	y,
	OFFSET_X = 0,
	OFFSET_Y = 0,
	ROWS = 6,
	COLUMNS = 6;


for(x; x < ROWS; x++) {

	for(y = 0; y < COLUMNS; y++) {

		cells[ACTIVE_CLASS+x+y] = createCell(x,y);
	}
}

var styleEl = doc.getElementsByTagName('style')[0];
styleEl.innerHTML = hoverCss;

function createCell(x,y) {

	var sides = ['front','back','top','bottom','left','right'],
		className = ACTIVE_CLASS+x+y,
		container = wrap[appendChild](createDiv('cube ' + className));

	container.x = x;
	container.y = y;


	hoverCss+= '.' + className + '{transform:'+positionCell(container)+'}';
	hoverCss+= '.' + className + '.'+ACTIVE_CLASS+'{transform:'+positionCell(container,1)+'}';

	while(sides.length) {
		container[appendChild](createDiv(sides.shift()));
	}

	container.addEventListener('mouseover',activateCells);
	container.addEventListener('mouseout', deactivateCells);

	return container;
}

function activateCells() {
	cellsAction(this, 'add');
}

function deactivateCells() {
	cellsAction(this, 'remove');
}

function cellsAction(cell, method) {

	getCell(cell.x,cell.y);
	getCell(cell.x-1,cell.y);
	getCell(cell.x+1,cell.y);
	getCell(cell.x,cell.y-1);
	getCell(cell.x,cell.y+1);

	function getCell(x,y){
		var actualCell = cells[ACTIVE_CLASS+x+y];
		if(actualCell && actualCell.b != method) {
			actualCell.b=method;
			actualCell.classList[method](ACTIVE_CLASS);
		}
	}
}


function positionCell(cell, isActive, isRotated) {

	var _x = cell.x*59.5 - cell.y*59;
	var _y = cell.y*39;

	if(isActive) {

		_y-=15;
	}

	return TRANSFORM.replace('A',_x).replace('B',_y);
}

/**
 * @param className
 * @returns {Element}
 */
function createDiv(className) {

	var div = doc.createElement('div');
	div.className = className;

	return div;
}
{'fraction_non_alphanumeric': 0.18997010959814015, 'fraction_numerical': 0.015277316506144138, 'mean_word_length': 4.748091603053435, 'pattern_counts': {'":': 0, '<': 7, '<?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': '6784732', 'n_tokens_mistral': 1218, 'n_tokens_neox': 1139, 'n_words': 207}