<commit_before><!DOCTYPE html>
<html>
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
	<title>Conway&apos;s Game of Life with D3.js</title>
	<meta name="generator" content="TextMate http://macromates.com/">
	<meta name="author" content="<NAME>">
	<link rel="stylesheet" href="./bootstrap.superhero.min.css" media="screen">
	<script src="jquery.min.js"></script>
	<script src="d3.v3.min.js"></script>
	<script src="cgol.js"></script>
	<style>
		#life {  }
		#gameBoard { border:1px solid #333;border-radius:5px;margin:6px auto;padding:6px;background-color:#4e5d6c;text-align:center;width:515px; }
		p, author { margin:4px; padding: 8px;}
		body { font-family:Verdana, Monaco, sans-serif;width:100%;height:100%; }
		div.thumbinner {
		    background-color: #f9f9f9;
		    border: 1px solid #ccc;
		    font-size: 12px;
		    overflow: hidden;
		    padding: 3px;
		    text-align: center;
		}
		.rightPanel{
			background-color: #f9f9f9;
		    border: 2px dotted #c5c5c5;
			font-size:12px;
			border:1px solid #333;
			border-radius:5px;
			padding:6px;
			text-align:center;
		}
		.mainBody{
			background-color: #f9f9f9;
		    border: 1px solid darkred;
		    font-size: 94%;
		    overflow: hidden;
		    padding: 3px;
			margin:10px;
			font-size:12px;
			background-color:#f9f9f9;
		}
		footer author, footer>div>a{ font-size:12px; }
		footer { text-align:left; }
	</style>
</head>
<body>
	<div style="container">
		
		<header class="row">
			<div class="col-lg-8 col-md-7 col-sm-6">
				<p>
					<a href="http://en.wikipedia.org/wiki/Conway%27s_Game_of_Life" target="_blank" title="Conway's Game of Life" style="display:block;">Conway's Game of Life</a>
					<span>4 Axioms to Conway's Game of Life</span>
				</p>
				<ol>
					<li>Any live cell with fewer than two live neighbors dies, as if caused by under-population.</li>
					<li>Any live cell with two or three live neighbors lives on to the next generation.</li>
					<li>Any live cell with more than three live neighbors dies, as if by overcrowding.</li>
					<li>Any dead cell with exactly three live neighbors becomes a live cell, as if by reproduction.</li>
				</ol>
				<p>
					Please refer to the <a href="http://en.wikipedia.org/wiki/Conway%27s_Game_of_Life" target="_blank" title="Conway's Game of Life">wikipedia link</a> to see what this is all about. There is a lot to it, and it has interesting implications
					to evolution, biological life, and mathematics. But... simply click the squares you want to seed the board with and hit &apos;Let there be life&apos;.
					Some patterns do more interesting things than others. The wikipedia page will tell you about them if you don't want to hunt.
					If you can create a gun or regenerative pattern you are on your way! Code available on <a href="https://github.com/mycrazydream/conways_life" target="_blank">GitHib</a>, 
					or just view the source. I haven't minified it. I have also written <a href="/conway/conways_life.py">a version in python</a> that is also available at my <a href="https://github.com/mycrazydream/conways_life" target="_blank">GitHib</a>.
				</p>
			</div>
			<div class="col-lg-4 col-md-5 col-sm-6">
				<br />
				<a class="image" href="http://www.wikipedia.org/wiki/File:Gospers_glider_gun.gif" target="_blank">
					<img width="250" height="180" data-file-height="180" data-file-width="250" class="thumbimage" src="http://upload.wikimedia.org/wikipedia/commons/e/e5/Gospers_glider_gun.gif" alt="">
				</a>
				<div class="thumbcaption">A single <a title="Bill Gosper" href="http://www.wikipedia.org/wiki/Bill_Gosper" target="_blank">Gosper</a>'s 
					<a title="Gun (cellular automaton)" href="http://www.wikipedia.org/wiki/Gun_(cellular_automaton)" target="_blank">Glider Gun</a> creating 
					"<a title="Glider (Conway's Life)" href="http://www.wikipedia.org/wiki/Glider_(Conway%27s_Life)" target="_blank">gliders</a>"
				</div>
			</div>
		</div>
	</header>
	<div class="row">
		<div class="col-sm-12">
			<div id="gameBoard">
				<ul class="nav nav-pills">
				  <li class="active"><a href="#">Generation <span class="badge" id="generation">0</span></a></li>
				</ul>
				<div id="life"></div>
				<a href="#" class="btn btn-info" onclick="life.beginLife();" id="beginLife">Let there be life</a>
				<a href="#" class="btn btn-warning" onclick="life.endLife();" id="endLife">Put life on hold</a>
				<a href="#" class="btn btn-danger" id="resetLife" onclick="life.endLife();life.updateBoardDisplay(true);">Smite (reset)</a>
				<input type="hidden" id="stopGag" value="start" />
			</div>
		</div>
	</div>
	<footer class="row">
		<div class="col-sm-12">
			
			<div style="margin-top:26px;text-align:center;">
				<a rel="license" href="http://creativecommons.org/licenses/by-nc-sa/4.0/"><img alt="Creative Commons License" style="border-width:0" src="https://i.creativecommons.org/l/by-nc-sa/4.0/80x15.png" /></a><br /><span xmlns:dct="http://purl.org/dc/terms/" href="http://purl.org/dc/dcmitype/InteractiveResource" property="dct:title" rel="dct:type">JS Playable Conway's Life</span> by <span xmlns:cc="http://creativecommons.org/ns#" property="cc:attributionName"><NAME></span> is licensed under a <a rel="license" href="http://creativecommons.org/licenses/by-nc-sa/4.0/">Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License</a>.
				<br /><br /><commit_msg>removed hash from href that made the page jump to the top<commit_after><!DOCTYPE html>
<html>
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
	<title>Conway&apos;s Game of Life with D3.js</title>
	<meta name="generator" content="TextMate http://macromates.com/">
	<meta name="author" content="<NAME>">
	<link rel="stylesheet" href="./bootstrap.superhero.min.css" media="screen">
	<script src="jquery.min.js"></script>
	<script src="d3.v3.min.js"></script>
	<script src="cgol.js"></script>
	<style>
		#life {  }
		#gameBoard { border:1px solid #333;border-radius:5px;margin:6px auto;padding:6px;background-color:#4e5d6c;text-align:center;width:515px; }
		p, author { margin:4px; padding: 8px;}
		body { font-family:Verdana, Monaco, sans-serif;width:100%;height:100%; }
		div.thumbinner {
		    background-color: #f9f9f9;
		    border: 1px solid #ccc;
		    font-size: 12px;
		    overflow: hidden;
		    padding: 3px;
		    text-align: center;
		}
		.rightPanel{
			background-color: #f9f9f9;
		    border: 2px dotted #c5c5c5;
			font-size:12px;
			border:1px solid #333;
			border-radius:5px;
			padding:6px;
			text-align:center;
		}
		.mainBody{
			background-color: #f9f9f9;
		    border: 1px solid darkred;
		    font-size: 94%;
		    overflow: hidden;
		    padding: 3px;
			margin:10px;
			font-size:12px;
			background-color:#f9f9f9;
		}
		footer author, footer>div>a{ font-size:12px; }
		footer { text-align:left; }
	</style>
</head>
<body>
	<div style="container">
		
		<header class="row">
			<div class="col-lg-8 col-md-7 col-sm-6">
				<p>
					<a href="http://en.wikipedia.org/wiki/Conway%27s_Game_of_Life" target="_blank" title="Conway's Game of Life" style="display:block;">Conway's Game of Life</a>
					<span>4 Axioms to Conway's Game of Life</span>
				</p>
				<ol>
					<li>Any live cell with fewer than two live neighbors dies, as if caused by under-population.</li>
					<li>Any live cell with two or three live neighbors lives on to the next generation.</li>
					<li>Any live cell with more than three live neighbors dies, as if by overcrowding.</li>
					<li>Any dead cell with exactly three live neighbors becomes a live cell, as if by reproduction.</li>
				</ol>
				<p>
					Please refer to the <a href="http://en.wikipedia.org/wiki/Conway%27s_Game_of_Life" target="_blank" title="Conway's Game of Life">wikipedia link</a> to see what this is all about. There is a lot to it, and it has interesting implications
					to evolution, biological life, and mathematics. But... simply click the squares you want to seed the board with and hit &apos;Let there be life&apos;.
					Some patterns do more interesting things than others. The wikipedia page will tell you about them if you don't want to hunt.
					If you can create a gun or regenerative pattern you are on your way! Code available on <a href="https://github.com/mycrazydream/conways_life" target="_blank">GitHib</a>, 
					or just view the source. I haven't minified it. I have also written <a href="/conway/conways_life.py">a version in python</a> that is also available at my <a href="https://github.com/mycrazydream/conways_life" target="_blank">GitHib</a>.
				</p>
			</div>
			<div class="col-lg-4 col-md-5 col-sm-6">
				<br />
				<a class="image" href="http://www.wikipedia.org/wiki/File:Gospers_glider_gun.gif" target="_blank">
					<img width="250" height="180" data-file-height="180" data-file-width="250" class="thumbimage" src="http://upload.wikimedia.org/wikipedia/commons/e/e5/Gospers_glider_gun.gif" alt="">
				</a>
				<div class="thumbcaption">A single <a title="<NAME>" href="http://www.wikipedia.org/wiki/Bill_Gosper" target="_blank">Gosper</a>'s 
					<a title="Gun (cellular automaton)" href="http://www.wikipedia.org/wiki/Gun_(cellular_automaton)" target="_blank">Glider Gun</a> creating 
					"<a title="Glider (Conway's Life)" href="http://www.wikipedia.org/wiki/Glider_(Conway%27s_Life)" target="_blank">gliders</a>"
				</div>
			</div>
		</div>
	</header>
	<div class="row">
		<div class="col-sm-12">
			<div id="gameBoard">
				<ul class="nav nav-pills">
				  <li class="active"><a href="javascript:;">Generation <span class="badge" id="generation">0</span></a></li>
				</ul>
				<div id="life"></div>
				<a href="javascript:;" class="btn btn-info" onclick="life.beginLife();" id="beginLife">Let there be life</a>
				<a href="javascript:;" class="btn btn-warning" onclick="life.endLife();" id="endLife">Put life on hold</a>
				<a href="javascript:;" class="btn btn-danger" id="resetLife" onclick="life.endLife();life.updateBoardDisplay(true);">Smite (reset)</a>
				<input type="hidden" id="stopGag" value="start" />
			</div>
		</div>
	</div>
	<footer class="row">
		<div class="col-sm-12">
			
			<div style="margin-top:26px;text-align:center;">
				<a rel="license" href="http://creativecommons.org/licenses/by-nc-sa/4.0/"><img alt="Creative Commons License" style="border-width:0" src="https://i.creativecommons.org/l/by-nc-sa/4.0/80x15.png" /></a><br /><span xmlns:dct="http://purl.org/dc/terms/" href="http://purl.org/dc/dcmitype/InteractiveResource" property="dct:title" rel="dct:type">JS Playable Conway's Life</span> by <span xmlns:cc="http://creativecommons.org/ns#" property="cc:attributionName"><NAME></span> is licensed under a <a rel="license" href="http://creativecommons.org/licenses/by-nc-sa/4.0/">Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License</a>.
				<br /><br />
{'fraction_non_alphanumeric': 0.1703696874711902, 'fraction_numerical': 0.02009772287268369, 'mean_word_length': 4.138796778777831, 'pattern_counts': {'":': 0, '<': 214, '<?xml version=': 0, '>': 218, 'https://': 6, 'lorem ipsum': 0, 'www.': 8, 'xml': 4}, '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': '3244651', 'n_tokens_mistral': 4315, 'n_tokens_neox': 3739, 'n_words': 914}