<commit_before>//cells.js
'use strict';
/* jshint indent: false */


angular.module('celllogger')
	
  	.controller('CellloggerCtrl', function ($scope,$http,,leafletData,$filter,AlertService,MAPSERVER, MAXS2LEVEL,leafletEvents,WEBSERVICE,$interval) {
		
		$scope.desaturate=true;
  		$scope.controller='CellloggerCtrl';
  		$scope.search={range:30,serving:"all",network:"all"};
  		$scope.providers=[];
  		$scope.s2zoom=MAPSERVER.center.zoom;
  		$scope.mouseclass=null;

  		function getProviders(){
			$http.get(WEBSERVICE + '/measurementproviders',{})
			.error(function(err){
	        	console.log(err);
	        })
	  		.success(function(result) {	
	  			//console.log(result);
	  			angular.forEach(result.providers.buckets,function(provider){
//	  				var arr = provider.key.split("-");
//	  				var mcc = arr[0];
//	  				var net = arr[1];
	  				$scope.providers.push({name:result.provider.key,mccmnc:provider.key});
//	  				$http.get(WEBSERVICE + '/provider',{mcc:parseInt(mcc), net:parseInt(net)})
//	  				.error(function(err){
//	  		        	console.log(err);
//	  		        })
//	  		  		.success(function(result) {	
//	  		  			$scope.providers.push({name:result.provider.name,mccmnc:provider.key});
//	  		  		})
	  				
	  				
	  			})
	  			// result.forEach(function(provider){
	  			// 	$scope.providers.push({name:provider.name,mccmnc:{mcc:provider.mcc,mnc:provider.mnc}});
	  			// })
	  			
	  		})
  		}
  		getProviders();


		$scope.dateOptions = {
			formatYear: 'yy',
			startingDay: 1
		};

		$scope.formats = ['dd-MM-yyyy', 'yyyy/MM/dd', 'dd.MM.yyyy', 'shortDate'];
		$scope.format = $scope.formats[0];

		
    	
		
		function getGeoHashes(){
			$http.defaults.useXDomain=true;
			
			if($scope.bounds){
	  			$scope.mouseclass="wait";
				var gp=6;
				switch(true){
					case ($scope.s2zoom<5):
						gp=2;
						break;
					case ($scope.s2zoom>4 && $scope.s2zoom<7):
						gp=3;
						break;
					case ($scope.s2zoom>6 && $scope.s2zoom<9):
						gp=4;
						break;
					case ($scope.s2zoom>8 && $scope.s2zoom<12):
						gp=5;
						break;
					case ($scope.s2zoom>11&& $scope.s2zoom<14):
						gp=6;
						break;
					case ($scope.s2zoom>14):
						gp=7;
						break;
				}
				

				var params={
					datePrecision:365,
					geohashPrecision:(gp),
					bottom_left:[$scope.bounds.southWest.lat,$scope.bounds.southWest.lng],
					top_right:[$scope.bounds.northEast.lat,$scope.bounds.northEast.lng]
				};

				if($scope.search.mccmnc){
  					params.net=$scope.search.mccmnc.mnc;
  					params.mcc=$scope.search.mccmnc.mcc;
  				}
	  			if($scope.search.dt){
	  				params.timestamp=new Date($scope.search.dt).getTime();
	  			}
	  			if($scope.search.serving!=='all')
	  				params.serving=$scope.search.serving==="true"
	  			if($scope.search.network!=='all')
	  				params.radio=$scope.search.network
		  		
		  		$http.get(WEBSERVICE + '/measurementcellcount',{<commit_msg>Fixed net selection<commit_after>//cells.js
'use strict';
/* jshint indent: false */


angular.module('celllogger')
	
  	.controller('CellloggerCtrl', function ($scope,$http,,leafletData,$filter,AlertService,MAPSERVER, MAXS2LEVEL,leafletEvents,WEBSERVICE,$interval) {
		
		$scope.desaturate=true;
  		$scope.controller='CellloggerCtrl';
  		$scope.search={range:30,serving:"all",network:"all"};
  		$scope.providers=[];
  		$scope.s2zoom=MAPSERVER.center.zoom;
  		$scope.mouseclass=null;

  		function getProviders(){
			$http.get(WEBSERVICE + '/measurementproviders',{})
			.error(function(err){
	        	console.log(err);
	        })
	  		.success(function(result) {	
	  			//console.log(result);
	  			angular.forEach(result.providers.buckets,function(provider){
//	  				var arr = provider.key.split("-");
//	  				var mcc = arr[0];
//	  				var net = arr[1];
	  				$scope.providers.push({name:result.provider.key,mccmnc:provider.key});
//	  				$http.get(WEBSERVICE + '/provider',{mcc:parseInt(mcc), net:parseInt(net)})
//	  				.error(function(err){
//	  		        	console.log(err);
//	  		        })
//	  		  		.success(function(result) {	
//	  		  			$scope.providers.push({name:result.provider.name,mccmnc:provider.key});
//	  		  		})
	  				
	  				
	  			})
	  			// result.forEach(function(provider){
	  			// 	$scope.providers.push({name:provider.name,mccmnc:{mcc:provider.mcc,mnc:provider.mnc}});
	  			// })
	  			
	  		})
  		}
  		getProviders();


		$scope.dateOptions = {
			formatYear: 'yy',
			startingDay: 1
		};

		$scope.formats = ['dd-MM-yyyy', 'yyyy/MM/dd', 'dd.MM.yyyy', 'shortDate'];
		$scope.format = $scope.formats[0];

		
    	
		
		function getGeoHashes(){
			$http.defaults.useXDomain=true;
			
			if($scope.bounds){
	  			$scope.mouseclass="wait";
				var gp=6;
				switch(true){
					case ($scope.s2zoom<5):
						gp=2;
						break;
					case ($scope.s2zoom>4 && $scope.s2zoom<7):
						gp=3;
						break;
					case ($scope.s2zoom>6 && $scope.s2zoom<9):
						gp=4;
						break;
					case ($scope.s2zoom>8 && $scope.s2zoom<12):
						gp=5;
						break;
					case ($scope.s2zoom>11&& $scope.s2zoom<14):
						gp=6;
						break;
					case ($scope.s2zoom>14):
						gp=7;
						break;
				}
				

				var params={
					datePrecision:365,
					geohashPrecision:(gp),
					bottom_left:[$scope.bounds.southWest.lat,$scope.bounds.southWest.lng],
					top_right:[$scope.bounds.northEast.lat,$scope.bounds.northEast.lng]
				};

				if($scope.search.mccmnc){
					params.net=$scope.search.mccmnc.split('-')[1];
                    params.mcc=$scope.search.mccmnc.split('-')[0];
  				}
	  			if($scope.search.dt){
	  				params.timestamp=new Date($scope.search.dt).getTime();
	  			}
	  			if($scope.search.serving!=='all')
	  				params.serving=$scope.search.serving==="true"
	  			if($scope.search.network!=='all')
	  				params.radio=$scope.search.network
		  		
		  		$http.get(WEBSERVICE + '/measurementcellcount',{
{'fraction_non_alphanumeric': 0.18175618073316283, 'fraction_numerical': 0.014663256606990622, 'mean_word_length': 2.6209876543209876, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 13, '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': '7232666', 'n_tokens_mistral': 2786, 'n_tokens_neox': 2244, 'n_words': 225}