<commit_before><!DOCTYPE html>
<html>
	<head>
		<script>global=window</script>
		<script src="http://cdnjs.cloudflare.com/ajax/libs/underscore.js/1.7.0/underscore-min.js"></script>
		<script src="http://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
		<script src="http://cdnjs.cloudflare.com/ajax/libs/flot/0.8.2/jquery.flot.min.js"></script>
		<script src='myo.js'></script>

    <script type="text/javascript" src=" https://rawgit.com/cadz7/52840392e9bb649f7369/raw/gistfile1.js">
     </script>
    <script type="text/javascript">
      meSpeak.loadConfig("https://rawgit.com/anonymous/4e90fd557f44ee5e1cd1/raw/");
    </script>

		<style>
			body{
				background-color : #0A0A0A;
				color : #84FFF1;
				font-family: 'Open Sans', sans-serif;
			}
			.plot{
				width:300px;
				height:800px;
				display : inline-block;
			}

			#events{
				border : 1px solid #427F78;
				font-family: courier;
				overflow-y : scroll;
				height : 800px;
				width: 500px;
			}
			.event{
				margin-bottom: 10px;
			}
			.event_data{
				width: 440px;
				font-size: 0.8em;
				margin-left: 20px;
				opacity: 0.8;
				white-space: pre-wrap;
				word-wrap: break-word;
			}
		</style>
	</head>
	<body>
		<title>IMU Graphs - Myo.js</title>
		<div style='display:inline-block'>
			<div>Gyroscope</div>
			<div id='gyroscope' class='plot' ></div>
		</div>
		<div style='display:inline-block'>
			<div>Accelerometer</div>
			<div id='accelerometer' class='plot'></div>
		</div>
		<div style='display:inline-block'>
			<div>Orientation</div>
			<div id='orientation' class='plot'></div>
		</div>
		<div style='display:inline-block'>
			<div> Events <button id='clear_events'>clear</button></div>
			<div id='events'></div>
		</div>
	</body>

	<script>

		var myo = Myo.create();

		var createGraph = function(elementId, startingData, range, resolution){
			var history = _.times(resolution, function(){
				return startingData;
			});
			var graph = {
				history : history,
				getGraphData : function(){
					var result = {};
					_.each(this.history, function(data, index){
						_.each(data, function(val, axis){
							result[axis] = result[axis] || {label : axis, data : []};
							result[axis].data.push([val, index])
						});
					});
					return _.values(result);
				},
				addData : function(data){
					this.history.push(data);
					this.history = this.history.slice(1);
					this.update();
				},
				update : function(){
					this.plot.setData(this.getGraphData());
					this.plot.draw()
				},
			};
			graph.plot = $.plot("#" + elementId, graph.getGraphData(), {
				series: {shadowSize: 0},
				colors: [ '#84FFF1', '#FFF38A', '#FF4B23', '#00797F'],
				xaxis: {
					min : -range,
					max : range
				},
				yaxis : {
					show: false,
					min : 0,
					max : resolution
				},
				legend : {
					backgroundOpacity : 0,
				},
				grid : {
					borderColor : "#427F78"
				}
			});
			return graph;
		}

		var gyroGraph = createGraph('gyroscope', {x:0,y:0,z:0}, 600, 100);
		var accelerationGraph = createGraph('accelerometer', {x:0,y:0,z:0}, 5, 100);
		var orientationGraph = createGraph('orientation', {x:0,y:0,z:0,w:0}, 1, 100);
		var hash_poses = {
			'rest' : NULL,
			'fist' : washroom,
			'waveOut' : hungry,
			'waveIn' : tired,
			'fingersSpread' : aid 
		};

		myo.on('imu', function(data){
			gyroGraph.addData(data.gyroscope);
			orientationGraph.addData(data.orientation);
			accelerationGraph.addData(data.accelerometer);
		})

		myo.on('*', function(event, data){
			if(!_.contains(['imu', 'orientation', 'accelerometer', 'gyroscope', 'position', 'pose', 'rest'], event)){
				$('<div class="event">' + event + '<div class="event_data">' + JSON.stringify(data) + '</div></div>')
				.prependTo($('#events'));
			}
		});

		myo.on('pose', function(pose_name, edge){
			hash_poses[pose_name]			
		});

		myo.on('')

		$('#clear_events').click(function(){
			$('#events').html('');
		})
	</script>
      <script type="text/javascript">
        meSpeak.loadVoice('https://rawgit.com/anonymous/dfc4df67cf40138850a8/raw/');
        meSpeak.speak('hello Nilay! How are you?');
      </script>

</html>
<commit_msg>add scenario for consecutive gestures<commit_after><!DOCTYPE html>
<html>
	<head>
		<script>global=window</script>
		<script src="http://cdnjs.cloudflare.com/ajax/libs/underscore.js/1.7.0/underscore-min.js"></script>
		<script src="http://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
		<script src="http://cdnjs.cloudflare.com/ajax/libs/flot/0.8.2/jquery.flot.min.js"></script>
		<script src='myo.js'></script>

    <script type="text/javascript" src=" https://rawgit.com/cadz7/52840392e9bb649f7369/raw/gistfile1.js">
     </script>
    <script type="text/javascript">
      meSpeak.loadConfig("https://rawgit.com/anonymous/4e90fd557f44ee5e1cd1/raw/");
    </script>

		<style>
			body{
				background-color : #0A0A0A;
				color : #84FFF1;
				font-family: 'Open Sans', sans-serif;
			}
			.plot{
				width:300px;
				height:800px;
				display : inline-block;
			}

			#events{
				border : 1px solid #427F78;
				font-family: courier;
				overflow-y : scroll;
				height : 800px;
				width: 500px;
			}
			.event{
				margin-bottom: 10px;
			}
			.event_data{
				width: 440px;
				font-size: 0.8em;
				margin-left: 20px;
				opacity: 0.8;
				white-space: pre-wrap;
				word-wrap: break-word;
			}
		</style>
	</head>
	<body>
		<title>IMU Graphs - Myo.js</title>
		<div style='display:inline-block'>
			<div>Gyroscope</div>
			<div id='gyroscope' class='plot' ></div>
		</div>
		<div style='display:inline-block'>
			<div>Accelerometer</div>
			<div id='accelerometer' class='plot'></div>
		</div>
		<div style='display:inline-block'>
			<div>Orientation</div>
			<div id='orientation' class='plot'></div>
		</div>
		<div style='display:inline-block'>
			<div> Events <button id='clear_events'>clear</button></div>
			<div id='events'></div>
		</div>
	</body>

	<script>

		var myo = Myo.create();

		var createGraph = function(elementId, startingData, range, resolution){
			var history = _.times(resolution, function(){
				return startingData;
			});
			var graph = {
				history : history,
				getGraphData : function(){
					var result = {};
					_.each(this.history, function(data, index){
						_.each(data, function(val, axis){
							result[axis] = result[axis] || {label : axis, data : []};
							result[axis].data.push([val, index])
						});
					});
					return _.values(result);
				},
				addData : function(data){
					this.history.push(data);
					this.history = this.history.slice(1);
					this.update();
				},
				update : function(){
					this.plot.setData(this.getGraphData());
					this.plot.draw()
				},
			};
			graph.plot = $.plot("#" + elementId, graph.getGraphData(), {
				series: {shadowSize: 0},
				colors: [ '#84FFF1', '#FFF38A', '#FF4B23', '#00797F'],
				xaxis: {
					min : -range,
					max : range
				},
				yaxis : {
					show: false,
					min : 0,
					max : resolution
				},
				legend : {
					backgroundOpacity : 0,
				},
				grid : {
					borderColor : "#427F78"
				}
			});
			return graph;
		}

		var gyroGraph = createGraph('gyroscope', {x:0,y:0,z:0}, 600, 100);
		var accelerationGraph = createGraph('accelerometer', {x:0,y:0,z:0}, 5, 100);
		var orientationGraph = createGraph('orientation', {x:0,y:0,z:0,w:0}, 1, 100);
		var hash_poses = {
			'rest' : NULL,
			'fist' : washroom,
			'waveOut' : hungry,
			'waveIn' : tired,
			'fingersSpread' : aid 
		};
		var previous_pose = 'rest';

		myo.on('imu', function(data){
			gyroGraph.addData(data.gyroscope);
			orientationGraph.addData(data.orientation);
			accelerationGraph.addData(data.accelerometer);
		})

		// myo.on('*', function(event, data){
		// 	if(!_.contains(['imu', 'orientation', 'accelerometer', 'gyroscope', 'position', 'pose', 'rest'], event)){
		// 		$('<div class="event">' + event + '<div class="event_data">' + JSON.stringify(data) + '</div></div>')
		// 		.prependTo($('#events'));
		// 	}
		// });

		myo.on('pose', function(pose_name, edge){
			var outputString = hash_poses[pose_name];
			if (previous_pose == 'fingersSpread' && pose_name == 'fingersSpread') {
				outputString = 'ice';
			}
			previous_pose = pose_name;
			return outputString;
		});

		myo.on('')

		$('#clear_events').click(function(){
			$('#events').html('');
		})
	</script>
      <script type="text/javascript">
        meSpeak.loadVoice('https://rawgit.com/anonymous/dfc4df67cf40138850a8/raw/');
        meSpeak.speak('hello Nilay! How are you?');
      </script>

</html>

{'fraction_non_alphanumeric': 0.1928963663979437, 'fraction_numerical': 0.03061105269307162, 'mean_word_length': 3.125301204819277, 'pattern_counts': {'":': 0, '<': 121, '<?xml version=': 0, '>': 121, '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': '6478899', 'n_tokens_mistral': 4004, 'n_tokens_neox': 3140, 'n_words': 534}