<commit_before>angular.module('controllers.index', ['filters.start_from', 'ui.bootstrap', 'ui.bootstrap.tpls']);
angular.module('controllers.index').controller('IndexCtrl', ['$http', '$scope', '$location', function ($http, $scope, $location) {
  
  $scope.movies = window.movies;
  $scope.predicate = '-meta_score';
  $scope.currentPage = 1;
  $scope.pageSize = 6;
  $scope.showPagesNum = 8;

  $scope.sortDirection = function () {
    return ($scope.reverse) ? 'ascending' : 'descending';
  }

  $scope.play = function (movie, event) {
    event.preventDefault();
    var data = { hbo_id : movie.hbo_id };
    $http.post('/play', data)
      .success(function () {
        window.open(movie.hbo_link);
      });
  };

  $scope.updatePredicate = function (predicate) {
    if ($scope.predicate === predicate) {
      $scope.reverse = !$scope.reverse
    };
      $scope.predicate = predicate;
  };

}]);<commit_msg>Sophisticated sorting for sophisticated individuals<commit_after>angular.module('controllers.index', ['filters.start_from', 'ui.bootstrap', 'ui.bootstrap.tpls']);
angular.module('controllers.index').controller('IndexCtrl', ['$http', '$scope', '$location', function ($http, $scope, $location) {
  
  $scope.movies = window.movies;
  $scope.predicate = '-meta_score';
  $scope.currentPage = 1;
  $scope.pageSize = 6;
  $scope.showPagesNum = 8;

  $scope.play = function (movie, event) {
    event.preventDefault();
    var data = { hbo_id : movie.hbo_id };
    $http.post('/play', data)
      .success(function () {
        window.open(movie.hbo_link);
      });
  };

  $scope.sortDirection = function () {
    return ($scope.reverse) ? 'ascending' : 'descending';
  }

  $scope.updatePredicate = function (predicate) {
    if ($scope.predicate === predicate) {
      $scope.reverse = !$scope.reverse
    };
      $scope.predicate = predicate;
      $scope.currentPage = 1;
  };
}]);
{'fraction_non_alphanumeric': 0.1823932525039536, 'fraction_numerical': 0.0036900369003690036, 'mean_word_length': 3.6519607843137254, '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': '3302421', 'n_tokens_mistral': 637, 'n_tokens_neox': 618, 'n_words': 108}