<commit_before>var primed = angular.module('primed', ['ngRoute', 'ngResource']);

//ROUTES
primed.config(function($routeProvider) {
    
  $routeProvider
      .when('/', {
      templateUrl: 'pages/home.html',
      controller: 'homeController'
      })

      .when('/forecast', {
      templateUrl: 'pages/forecast.html',
      controller: 'forecastController'
      })
    
      .when('/forecast/:days', {
      templateUrl: 'pages/forecast.html',
      controller: 'forecastController'
      });
    
});

//SERVICES
primed.service('cityService', function() {
    
    this.city = "Denver";
    
});

//CONTROLLERS
primed.controller('homeController', ['$scope', 'cityService', function($scope, cityService) {
    
    $scope.city = cityService.city;
    
    $scope.$watch('city', function() {
        cityService.city = $scope.city;
    });

}]);

primed.controller('forecastController', ['$scope', '$resource', '$routeParams', 'cityService', function($scope, $resource, $routeParams cityService) {

    $scope.city = cityService.city;
    
    $scope.days = $routeParams.days || 5;

    $scope.weatherAPI = $resource('http://api.openweathermap.org/data/2.5/forecast/daily?appid=7725b4973215a5596e6c67a9eeb3bb22&units=imperial', { callback: 'JSON_CALLBACK' }, { get: { method: 'JSONP' }});
    
    $scope.weatherResult = $scope.weatherAPI.get({ q: $scope.city, cnt:  });
    
    $scope.simpleTemp = function(temp) {
        
        return Math.floor(temp);
        
    };
    
    $scope.convertToDate = function(date) {
        
        return new Date(date * 1000);
        
    };
    
}]);
   <commit_msg>Pass scope days to count<commit_after>var primed = angular.module('primed', ['ngRoute', 'ngResource']);

//ROUTES
primed.config(function($routeProvider) {
    
  $routeProvider
      .when('/', {
      templateUrl: 'pages/home.html',
      controller: 'homeController'
      })

      .when('/forecast', {
      templateUrl: 'pages/forecast.html',
      controller: 'forecastController'
      })
    
      .when('/forecast/:days', {
      templateUrl: 'pages/forecast.html',
      controller: 'forecastController'
      });
    
});

//SERVICES
primed.service('cityService', function() {
    
    this.city = "Denver";
    
});

//CONTROLLERS
primed.controller('homeController', ['$scope', 'cityService', function($scope, cityService) {
    
    $scope.city = cityService.city;
    
    $scope.$watch('city', function() {
        cityService.city = $scope.city;
    });

}]);

primed.controller('forecastController', ['$scope', '$resource', '$routeParams', 'cityService', function($scope, $resource, $routeParams cityService) {

    $scope.city = cityService.city;
    
    $scope.days = $routeParams.days || 5;

    $scope.weatherAPI = $resource('http://api.openweathermap.org/data/2.5/forecast/daily?appid=7725b4973215a5596e6c67a9eeb3bb22&units=imperial', { callback: 'JSON_CALLBACK' }, { get: { method: 'JSONP' }});
    
    $scope.weatherResult = $scope.weatherAPI.get({ q: $scope.city, cnt: $scope.days });
    
    $scope.simpleTemp = function(temp) {
        
        return Math.floor(temp);
        
    };
    
    $scope.convertToDate = function(date) {
        
        return new Date(date * 1000);
        
    };
    
}]);
   
{'fraction_non_alphanumeric': 0.16983445738810546, 'fraction_numerical': 0.017780502759043533, 'mean_word_length': 2.8661137440758293, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '24772', 'n_tokens_mistral': 1102, 'n_tokens_neox': 1055, 'n_words': 157}