<commit_before><!DOCTYPE html>
<html>
<head>
	<meta charset="utf-8">

	<title>SHE'S LUMP</title>

<style type="text/css">
html, body, div, p {
	margin: 0;
	padding: 0;
	font-family: Helvetica, sans-serif;
}

#loading, #nooo, #error {
	padding: 20px;
}

#boogie {
	position: absolute;

	top: 50%;
	left: 50%;

	height: 500px;
	width: 500px;
	margin-top: -250px;
	margin-left: -250px;
}

a {
	color: #eee;
}

#yo {
	position: fixed;
	bottom: 10px;
	right: 10px;

	padding: 10px;

	font-size: 0.8em;

	color: #fff;

	background-color: #000;
	border: 1px solid #666;
}

#yo p,
#yo div {
        margin: 0; padding: 0;
}
</style>
</head>
<body>

<div id="loading">
	<p>loading...</p>
</div>

<div id="nooo" style="display: none;">
	<p>okay you probably need a cooler browser for this (webgl + html audio).</p>
</div>

<div id="error" style="display: none;">
	<p>welp, something went wrong. I dunno. you figure it out 💯.</p>
</div>

<div id="boogie" style="display: none;">
	<button id="play">play</button>
	<button id="stop">stop</button>

	<canvas id="canvas" width="500" height="500"></canvas>
</div>

<div id="yo">
	<p>
		<a href="https://twitter.com/notjosh">@notjosh</a>
		/
		<a href="https://github.com/notjosh/sheslump">github</a>
	</p>
</div>

<script type="text/javascript">

(function() {
	var SHES_LUMP_DOT_WAV = 'asset/sheslump.wav';

	var $loading = document.getElementById('loading');
	var $nooo = document.getElementById('nooo');
	var $error = document.getElementById('error');
	var $boogie = document.getElementById('boogie');
	var $canvas = document.getElementById('canvas');

	var $audio = {
		play: document.getElementById('play'),
		stop: document.getElementById('stop')
	};

	var Audio = function(URL) {
		this.URL = URL;
		this.context = new window.AudioContext();
		this.buffer = {};
		this.source = null;
		this.onPlay = null;
		this.onStop = null;
		this.playing = false;
		this.startTime = 0;
		this.play = function() {
			if (this.playing) {
				return;
			}

			this.source = this.context.createBufferSource();
			this.source.buffer = this.buffer;
			this.source.loop = true;
			this.source.connect(this.context.destination);

			this.source.start();
			this.playing = true;
			this.startTime = this.context.currentTime;

			if (this.onPlay) {
				this.onPlay();
			}
		};
		this.stop = function() {
			if (!this.playing) {
				return;
			}

			this.source.stop();
			this.playing = false;

			if (this.onStop) {
				this.onStop();
			}

			this.playing = false;
		};

		return this;
	};

	var audio = null;

	var display = function(section) {
		$loading.style.display = (section == 'loading') ? '' : 'none';
		$error.style.display    = (section == 'error') ? '' : 'none';
		$nooo.style.display    = (section == 'nooo') ? '' : 'none';
		$boogie.style.display  = (section == 'boogie') ? '' : 'none';
	};

	var hasWebGL = function() {
		var compatible = false;
		try {
			// https://github.com/mrdoob/three.js/blob/master/examples/js/Detector.js
			var canvas = document.createElement('canvas');
			compatible = !!(window.WebGLRenderingContext && (canvas.getContext('webgl') || canvas.getContext('experimental-webgl')));
		} catch(e) {
			compatible = false;
		}

		return compatible;
	};

	var hasWebAudio = function() {
		var compatible = false;
		try {
			window.AudioContext = window.AudioContext || window.webkitAudioContext;
			var context = new window.AudioContext();
			compatible = true;
		} catch(e) {
			compatible = false;
		}

		return compatible;
	};

	var compatible = function() {
		return hasWebGL() && hasWebAudio();
	};<commit_msg>Removed webgl check. Snappysnappy.<commit_after><!DOCTYPE html>
<html>
<head>
	<meta charset="utf-8">

	<title>SHE'S LUMP</title>

<style type="text/css">
html, body, div, p {
	margin: 0;
	padding: 0;
	font-family: Helvetica, sans-serif;
}

#loading, #nooo, #error {
	padding: 20px;
}

#boogie {
	position: absolute;

	top: 50%;
	left: 50%;

	height: 500px;
	width: 500px;
	margin-top: -250px;
	margin-left: -250px;
}

a {
	color: #eee;
}

#yo {
	position: fixed;
	bottom: 10px;
	right: 10px;

	padding: 10px;

	font-size: 0.8em;

	color: #fff;

	background-color: #000;
	border: 1px solid #666;
}

#yo p,
#yo div {
        margin: 0; padding: 0;
}
</style>
</head>
<body>

<div id="loading">
	<p>loading...</p>
</div>

<div id="nooo" style="display: none;">
	<p>okay you probably need a cooler browser for this (canvas + html audio).</p>
</div>

<div id="error" style="display: none;">
	<p>welp, something went wrong. I dunno. you figure it out 💯.</p>
</div>

<div id="boogie" style="display: none;">
	<button id="play">play</button>
	<button id="stop">stop</button>

	<canvas id="canvas" width="500" height="500"></canvas>
</div>

<div id="yo">
	<p>
		<a href="https://twitter.com/notjosh">@notjosh</a>
		/
		<a href="https://github.com/notjosh/sheslump">github</a>
	</p>
</div>

<script type="text/javascript">

(function() {
	var SHES_LUMP_DOT_WAV = 'asset/sheslump.wav';

	var $loading = document.getElementById('loading');
	var $nooo = document.getElementById('nooo');
	var $error = document.getElementById('error');
	var $boogie = document.getElementById('boogie');
	var $canvas = document.getElementById('canvas');

	var $audio = {
		play: document.getElementById('play'),
		stop: document.getElementById('stop')
	};

	var Audio = function(URL) {
		this.URL = URL;
		this.context = new window.AudioContext();
		this.buffer = {};
		this.source = null;
		this.onPlay = null;
		this.onStop = null;
		this.playing = false;
		this.startTime = 0;
		this.play = function() {
			if (this.playing) {
				return;
			}

			this.source = this.context.createBufferSource();
			this.source.buffer = this.buffer;
			this.source.loop = true;
			this.source.connect(this.context.destination);

			this.source.start();
			this.playing = true;
			this.startTime = this.context.currentTime;

			if (this.onPlay) {
				this.onPlay();
			}
		};
		this.stop = function() {
			if (!this.playing) {
				return;
			}

			this.source.stop();
			this.playing = false;

			if (this.onStop) {
				this.onStop();
			}

			this.playing = false;
		};

		return this;
	};

	var audio = null;

	var display = function(section) {
		$loading.style.display = (section == 'loading') ? '' : 'none';
		$error.style.display    = (section == 'error') ? '' : 'none';
		$nooo.style.display    = (section == 'nooo') ? '' : 'none';
		$boogie.style.display  = (section == 'boogie') ? '' : 'none';
	};

	var hasWebGL = function() {
		var compatible = false;
		try {
			// https://github.com/mrdoob/three.js/blob/master/examples/js/Detector.js
			var canvas = document.createElement('canvas');
			compatible = !!(canvas.getContext('2d'));
		} catch(e) {
			compatible = false;
		}

		return compatible;
	};

	var hasWebAudio = function() {
		var compatible = false;
		try {
			window.AudioContext = window.AudioContext || window.webkitAudioContext;
			var context = new window.AudioContext();
			compatible = true;
		} catch(e) {
			compatible = false;
		}

		return compatible;
	};

	var compatible = function() {
		return hasWebGL() && hasWebAudio();
	};
{'fraction_non_alphanumeric': 0.18247248094834886, 'fraction_numerical': 0.012842224103866779, 'mean_word_length': 3.5400384368994233, 'pattern_counts': {'":': 0, '<': 81, '<?xml version=': 0, '>': 81, 'https://': 6, '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': '6553399', 'n_tokens_mistral': 2942, 'n_tokens_neox': 2592, 'n_words': 567}