<commit_before>(function () {
  'use strict';

  /* @ngInject */
  angular
    .module('app.controllers', ['app.services'])
    .controller('WeekListCtrl', WeekListCtrl)
    .controller('WeekDetailCtrl', WeekDetailCtrl)
    .controller('WeekDeleteCtrl', WeekDeleteCtrl)
    .controller('DayDetailCtrl', DayDetailCtrl)
    .controller('MainCtrl', MainCtrl);

  /* @ngInject */
  function WeekListCtrl (Week, $scope, Page) {
    Page.setTitle('Weeks');
    this.weeks = Week.query();
  }

  /* @ngInject */
  function WeekDetailCtrl ($routeParams, Week, Days, DayToggleWr, $scope, Page) {
    Page.setTitle('Week');
    this.week = Week.get({ id: $routeParams.id });
    this.days = Days.query({ id: $routeParams.id });
    $scope.togglewr = function(dayId, position) {
      (DayToggleWr.toggleWr({ id: dayId }))
        .$promise
          .then(function(data) {
            $scope.weekdetail.week = data;
            $scope.weekdetail.days[position].well_registered = !$scope.weekdetail.days[position].well_registered;
          })
          .catch(function(response) {
            console.log(response);
          });
    };

  }

  /* @ngInject */
  function WeekDeleteCtrl ($routeParams, Week) {
    Week.remove({ id: $routeParams.id });
  }

  /* @ngInject */
  function DayDetailCtrl ($routeParams, Day, Ods, OdToggleO, OdToggleD, $scope, Page) {
    Page.setTitle('Day');
    this.day = Day.get({ id: $routeParams.id });
    this.ods = Ods.query({ id: $routeParams.id });
    $scope.toggle_o = function(odId, position) {
      (OdToggleO.toggle_o({ id: odId }))
        .$promise
          .then(function(data) {
            $scope.daydetail.ods[position].o = !$scope.daydetail.ods[position].o;
          })
          .catch(function(response) {
            console.log(response);
          });
    };
    $scope.toggle_d = function(odId, position) {
      (OdToggleD.toggle_d({ id: odId }))
        .$promise
          .then(function(data) {
            $scope.daydetail.ods[position].d = !$scope.daydetail.ods[position].d;
          })
          .catch(function(response) {
            console.log(response);
          });
    };
  }

  /* @ngInject */
  function MainCtrl ($scope, Page) {
    $scope.Page = Page;
  }

})();
<commit_msg>adds currentDate to $scope<commit_after>(function () {
  'use strict';

  /* @ngInject */
  angular
    .module('app.controllers', ['app.services'])
    .controller('WeekListCtrl', WeekListCtrl)
    .controller('WeekDetailCtrl', WeekDetailCtrl)
    .controller('WeekDeleteCtrl', WeekDeleteCtrl)
    .controller('DayDetailCtrl', DayDetailCtrl)
    .controller('MainCtrl', MainCtrl);

  /* @ngInject */
  function WeekListCtrl (Week, $scope, Page) {
    Page.setTitle('Weeks');
    this.weeks = Week.query();
  }

  /* @ngInject */
  function WeekDetailCtrl ($routeParams, Week, Days, DayToggleWr, $scope, Page) {
    Page.setTitle('Week');
    this.week = Week.get({ id: $routeParams.id });
    this.days = Days.query({ id: $routeParams.id });
    $scope.togglewr = function(dayId, position) {
      (DayToggleWr.toggleWr({ id: dayId }))
        .$promise
          .then(function(data) {
            $scope.weekdetail.week = data;
            $scope.weekdetail.days[position].well_registered = !$scope.weekdetail.days[position].well_registered;
          })
          .catch(function(response) {
            console.log(response);
          });
    };

    $scope.currentDate = new Date();

  }

  /* @ngInject */
  function WeekDeleteCtrl ($routeParams, Week) {
    Week.remove({ id: $routeParams.id });
  }

  /* @ngInject */
  function DayDetailCtrl ($routeParams, Day, Ods, OdToggleO, OdToggleD, $scope, Page) {
    Page.setTitle('Day');
    this.day = Day.get({ id: $routeParams.id });
    this.ods = Ods.query({ id: $routeParams.id });
    $scope.toggle_o = function(odId, position) {
      (OdToggleO.toggle_o({ id: odId }))
        .$promise
          .then(function(data) {
            $scope.daydetail.ods[position].o = !$scope.daydetail.ods[position].o;
          })
          .catch(function(response) {
            console.log(response);
          });
    };
    $scope.toggle_d = function(odId, position) {
      (OdToggleD.toggle_d({ id: odId }))
        .$promise
          .then(function(data) {
            $scope.daydetail.ods[position].d = !$scope.daydetail.ods[position].d;
          })
          .catch(function(response) {
            console.log(response);
          });
    };
  }

  /* @ngInject */
  function MainCtrl ($scope, Page) {
    $scope.Page = Page;
  }

})();

{'fraction_non_alphanumeric': 0.16662998018930222, 'fraction_numerical': 0.0, 'mean_word_length': 2.5334370139968896, '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': '89340', 'n_tokens_mistral': 1477, 'n_tokens_neox': 1453, 'n_words': 238}