<commit_before><html>
<head>
	<meta charset="utf-8">
	<title>rPiTV - Remote</title>
	<link href="css/bootstrap.css" rel="stylesheet" type="text/css">
	<link href="css/flat-ui.css" rel="stylesheet" type="text/css">
	<link href="css/style.css" rel="stylesheet" type="text/css">
	<link rel="apple-touch-icon" href="images/custom_icon.png"/>
	<link rel="apple-touch-startup-image" href="images/startup.png">
	
	<meta name="viewport" content="width=device-width,height=device-height initial-scale=1, maximum-scale=1, user-scalable=no" />
	<meta name="apple-mobile-web-app-title" content="Remote">
	<meta name="apple-mobile-web-app-capable" content="yes">
	
	
</head>
<body>
	<div class="r-container ">
		<div class="r-header">
			<h2>rPiTV Remote</h2>
		</div>
		<div class="r-logo">
			<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 570 720"><script/>
			 <path fill="#FFF" d="m365.2,521.85a71.956,66.532,0,1,1,-143.91,0,71.956,66.532,0,1,1,143.91,0z" transform="matrix(1.131107,0,0,1.1280497,-43.139135,-68.310983)"/>
			 <path fill="#FFF" d="m262.84,276.65a61.875,28.125,0,1,1,-123.75,0,61.875,28.125,0,1,1,123.75,0z" transform="matrix(0.76741684,-1.1613112,2.171115,1.4224368,-560.88858,217.68859)"/>
			 <path fill="#FFF" d="m262.84,276.65a61.875,28.125,0,1,1,-123.75,0,61.875,28.125,0,1,1,123.75,0z" transform="matrix(-0.76741684,-1.1613112,-2.171115,1.4224368,1134.8288,213.68859)"/>
			 <path fill="#FFF" d="M72.91,342.09c36.41-9.76,12.292,150.63-17.333,137.47-32.587-26.21-43.083-102.97,17.333-137.47z"/>
			 <path fill="#FFF" d="m493.68,340.09c-36.414-9.7569-12.292,150.64,17.333,137.48,32.587-26.213,43.083-102.98-17.333-137.48z"/>
			 <path fill="#FFF" d="m369.97,220.65c62.835-10.61,115.12,26.722,113.01,94.858-2.0669,26.121-136.16-90.969-113.01-94.858z"/>
			 <path fill="#FFF" d="M196.36,218.65c-62.84-10.61-115.12,26.73-113.01,94.86,2.067,26.12,136.16-90.97,113.01-94.86z"/>
			 <path fill="#FFF" d="m286.62,202.76c-37.503-0.97548-73.495,27.834-73.582,44.544-0.10462,20.304,29.651,41.093,73.837,41.62,45.123,0.32321,73.916-16.64,74.061-37.594,0.16484-23.74-41.039-48.937-74.317-48.571z"/>
			 <path fill="#FFF" d="m288.91,619.12c32.697-1.4271,76.571,10.532,76.657,26.396,0.5427,15.405-39.79,50.211-78.826,49.538-40.427,1.7439-80.069-33.116-79.55-45.199-0.60506-17.716,49.226-31.548,81.719-30.735z"/>
			 <path fill="#FFF" d="m168.14,525.1c23.279,28.046,33.891,77.319,14.464,91.844-18.379,11.088-63.012,6.5216-94.736-39.052-21.395-38.242-18.638-77.157-3.6159-88.589,22.464-13.684,57.173,4.799,83.889,35.797z"/>
			 <path fill="#FFF" d="m405.02,516.21c-25.187,29.502-39.212,83.31-20.838,100.64,17.568,13.464,64.729,11.582,99.566-36.756,25.296-32.465,16.82-86.682,2.3708-101.08-21.464-16.602-52.277,4.6449-81.099,37.188z"/>
			</svg>
		</div>
		<div class="app-body">
			<div class=" search">
			  <input type="text" placeholder="Search Youtube" class="span3">
			</div>
		<section class="slider">
			<div class="list-wrapper">
				<!-- List All Presentations -->
				<div class="video-slider carousel">
		
					<ul class="video slides list-pres span4" style="display: block;">
						
					</ul>
		
				</div>

	</div>
</section>
</div>
	<!-- Les Javascripts -->
	<script src="/socket.io/socket.io.js"></script>
	<script src="js/jquery-2.0.1.min.js"></script>
	<script src="js/jquery.flexslider.js"></script>
	<script src="js/quo.js"></script>
	<script src="js/mustache.js"></script>
	
	<script>
	  //Youtube
	  var Youtube = {
		  	getVideo: function(query){
			  	var max_videos = 6;
			  	var url = "http://gdata.youtube.com/feeds/api/videos?vq=" + escape(query) + "&max-results=" + max_videos + "&alt=json-in-script&callback=?";
			  	
			  	$.getJSON(url, function(data){
				  	
				  	var jsonObj = [];
			  		$(data.feed.entry).each(function(key, item){
				  		var a = item.id.$t.split("/"),
				  		    id = a[6],
				  			title = item.title.$t,
				  			thumbnail = item.media$group.media$thumbnail[0].url,
				  			totalSec = item.media$group.yt$duration.seconds,
				  			hours = parseInt( totalSec / 3600 ) % 24,
				  			minutes = parseInt( totalSec / 60 ) % 60,
				  			seconds = totalSec % 60;
				  		
				  		var duration = (hours < 10 ? "0" + hours : hours) + ":" + (minutes < 10 ? "0" + minutes : minutes) + ":" + (seconds  < 10 ? "0" + seconds : seconds);
				  		
				  		
				  		jsonObj = {
					  		id:id,
					  		title:title,
					  		thumbnail:thumbnail,
					  		duration:duration};
					  		
				  		
				  		var template = $('#videoTpl').html(),
				  			html = Mustache.to_html(template, jsonObj);
				  		$('ul.video').append(html);	
				  			
			  		});
			  		console.log(jsonObj);
			  		$('.video-slider').flexslider({
			  			animation: "slide",
			  			start: function(slider) {
			  				$(".video-slider").delay(500).fadeIn(200);
			  			}
			  		});
			  	});	
		  	}
	  }		
		
	  //Config
	  document.ontouchmove = function(e){
	  	 	 e.preventDefault();
	  	 }
	  
	  //Socket.io	 
	  var socket = io.connect('http://raspberrypi.local:8080/');
	  socket.on('connect', function(data){
		socket.emit('remote');
		
		$$(".r-container").swipeLeft(function(){
			socket.emit('controll',{action:"swipeLeft"}); 
		});
		
		$$(".r-container").swipeRight(function(){
			socket.emit('controll',{action:"swipeRight"}); 
		});
		$$(".r-container").tap(function(){
			socket.emit('controll',{action:"tap"}); 
			
		});
	  });
	  $(document).ready(function(){
		  
		  $(".search input").change(function() {
		    Youtube.getVideo($(this).val());
		  });
		  
		  
	  })
	
	</script>
	
	<script id="videoTpl" type="text/template">
		<li class="block">
			<div class="tile">
				<img class="tile-image big-illustration" src="{{thumbnail}}"/>			
				<h3 class="tile-title">{{title}}</h3>
				<p>Duration: {{duration}}</p>
				<a class="btn button btn-primary btn-large btn-block present" data-id={{id}}>Watch</a>
			</div>
		</li>
	</script>
</body>
</html>
<commit_msg>multi search<commit_after><html>
<head>
	<meta charset="utf-8">
	<title>rPiTV - Remote</title>
	<link href="css/bootstrap.css" rel="stylesheet" type="text/css">
	<link href="css/flat-ui.css" rel="stylesheet" type="text/css">
	<link href="css/style.css" rel="stylesheet" type="text/css">
	<link rel="apple-touch-icon" href="images/custom_icon.png"/>
	<link rel="apple-touch-startup-image" href="images/startup.png">
	
	<meta name="viewport" content="width=device-width,height=device-height initial-scale=1, maximum-scale=1, user-scalable=no" />
	<meta name="apple-mobile-web-app-title" content="Remote">
	<meta name="apple-mobile-web-app-capable" content="yes">
	
	
</head>
<body>
	<div class="r-container ">
		<div class="r-header">
			<h2>rPiTV Remote</h2>
		</div>
		<div class="r-logo">
			<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 570 720"><script/>
			 <path fill="#FFF" d="m365.2,521.85a71.956,66.532,0,1,1,-143.91,0,71.956,66.532,0,1,1,143.91,0z" transform="matrix(1.131107,0,0,1.1280497,-43.139135,-68.310983)"/>
			 <path fill="#FFF" d="m262.84,276.65a61.875,28.125,0,1,1,-123.75,0,61.875,28.125,0,1,1,123.75,0z" transform="matrix(0.76741684,-1.1613112,2.171115,1.4224368,-560.88858,217.68859)"/>
			 <path fill="#FFF" d="m262.84,276.65a61.875,28.125,0,1,1,-123.75,0,61.875,28.125,0,1,1,123.75,0z" transform="matrix(-0.76741684,-1.1613112,-2.171115,1.4224368,1134.8288,213.68859)"/>
			 <path fill="#FFF" d="M72.91,342.09c36.41-9.76,12.292,150.63-17.333,137.47-32.587-26.21-43.083-102.97,17.333-137.47z"/>
			 <path fill="#FFF" d="m493.68,340.09c-36.414-9.7569-12.292,150.64,17.333,137.48,32.587-26.213,43.083-102.98-17.333-137.48z"/>
			 <path fill="#FFF" d="m369.97,220.65c62.835-10.61,115.12,26.722,113.01,94.858-2.0669,26.121-136.16-90.969-113.01-94.858z"/>
			 <path fill="#FFF" d="M196.36,218.65c-62.84-10.61-115.12,26.73-113.01,94.86,2.067,26.12,136.16-90.97,113.01-94.86z"/>
			 <path fill="#FFF" d="m286.62,202.76c-37.503-0.97548-73.495,27.834-73.582,44.544-0.10462,20.304,29.651,41.093,73.837,41.62,45.123,0.32321,73.916-16.64,74.061-37.594,0.16484-23.74-41.039-48.937-74.317-48.571z"/>
			 <path fill="#FFF" d="m288.91,619.12c32.697-1.4271,76.571,10.532,76.657,26.396,0.5427,15.405-39.79,50.211-78.826,49.538-40.427,1.7439-80.069-33.116-79.55-45.199-0.60506-17.716,49.226-31.548,81.719-30.735z"/>
			 <path fill="#FFF" d="m168.14,525.1c23.279,28.046,33.891,77.319,14.464,91.844-18.379,11.088-63.012,6.5216-94.736-39.052-21.395-38.242-18.638-77.157-3.6159-88.589,22.464-13.684,57.173,4.799,83.889,35.797z"/>
			 <path fill="#FFF" d="m405.02,516.21c-25.187,29.502-39.212,83.31-20.838,100.64,17.568,13.464,64.729,11.582,99.566-36.756,25.296-32.465,16.82-86.682,2.3708-101.08-21.464-16.602-52.277,4.6449-81.099,37.188z"/>
			</svg>
		</div>
		<div class="app-body">
			<div class=" search">
			  <input type="text" placeholder="Search Youtube" class="span3">
			</div>
		<section class="slider">
			<div class="list-wrapper">
		
					<ul class="video slides list-pres span4" style="display: block;">
						
					</ul>
			</div>
		</section>
</div>
	<!-- Les Javascripts -->
	<script src="/socket.io/socket.io.js"></script>
	<script src="js/jquery-2.0.1.min.js"></script>
	<script src="js/jquery.flexslider.js"></script>
	<script src="js/quo.js"></script>
	<script src="js/mustache.js"></script>
	
	<script>
	  //Youtube
	  var Youtube = {
		  	getVideo: function(query){
			  	var max_videos = 12;
			  	var url = "http://gdata.youtube.com/feeds/api/videos?vq=" + escape(query) + "&max-results=" + max_videos + "&alt=json-in-script&callback=?";
			  	
			  	$.getJSON(url, function(data){
				  	$("ul.video").html("");
				  	var jsonObj = [];
			  		$(data.feed.entry).each(function(key, item){
				  		var a = item.id.$t.split("/"),
				  		    id = a[6],
				  			title = item.title.$t,
				  			thumbnail = item.media$group.media$thumbnail[0].url,
				  			totalSec = item.media$group.yt$duration.seconds,
				  			hours = parseInt( totalSec / 3600 ) % 24,
				  			minutes = parseInt( totalSec / 60 ) % 60,
				  			seconds = totalSec % 60;
				  		
				  		var duration = (hours < 10 ? "0" + hours : hours) + ":" + (minutes < 10 ? "0" + minutes : minutes) + ":" + (seconds  < 10 ? "0" + seconds : seconds);
				  		
				  		
				  		jsonObj = {
					  		id:id,
					  		title:title,
					  		thumbnail:thumbnail,
					  		duration:duration};
					  		
				  		
				  		var template = $('#videoTpl').html(),
				  			html = Mustache.to_html(template, jsonObj);
				  		$('ul.video').append(html);	
				  			
			  		});
			  		console.log(jsonObj);
			  		
			  	});	
		  	}
	  }		
		
	  //Config
	  document.ontouchmove = function(e){
	  	 	 e.preventDefault();
	  	 }
	  
	  //Socket.io	 
	  var socket = io.connect('http://raspberrypi.local:8080/');
	  socket.on('connect', function(data){
		socket.emit('remote');
		
		$$(".r-container").swipeLeft(function(){
			socket.emit('controll',{action:"swipeLeft"}); 
		});
		
		$$(".r-container").swipeRight(function(){
			socket.emit('controll',{action:"swipeRight"}); 
		});
		$$(".r-container").tap(function(){
			socket.emit('controll',{action:"tap"}); 
			
		});
	  });
	  $(document).ready(function(){
		  
		  $(".search input").change(function() {
			
		    Youtube.getVideo($(this).val());
		  });
		  
		  
	  })
	
	</script>
	
	<script id="videoTpl" type="text/template">
		<li class="block">
			<div class="tile">
				<img class="tile-image big-illustration" src="{{thumbnail}}"/>			
				<h3 class="tile-title">{{title}}</h3>
				<p>Duration: {{duration}}</p>
				<a class="btn button btn-primary btn-large btn-block present" data-id={{id}}>Watch</a>
			</div>
		</li>
	</script>
</body>
</html>

{'fraction_non_alphanumeric': 0.23189655172413792, 'fraction_numerical': 0.1914655172413793, 'mean_word_length': 3.105095541401274, 'pattern_counts': {'":': 4, '<': 162, '<?xml version=': 0, '>': 156, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 2}, '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': '2836642', 'n_tokens_mistral': 6832, 'n_tokens_neox': 4893, 'n_words': 525}