<commit_before>'use strict';

angular.module('users.admin').controller('UserListController', ['$scope', '$filter', 'Admin',
  function ($scope, $filter, Admin) {
    Admin.query(function (data) {
      $scope.users = data;
      $scope.buildPager();
    });

    $scope.buildPager = function () {
      $scope.timezoneGroups = [];
      $scope.timezoneList = [];
      $scope.figureOutItemsToDisplay();
    };

    $scope.figureOutItemsToDisplay = function () {
      $scope.users = $filter('filter')($scope.users, {
        $: $scope.search
      });
      $scope.timezoneGrouper();
    };
      
      //takes in pre-searched array of users
      //sorts by user.timezoneOffset
      //creates array(timezones) of arrays(users in each timezone)
    $scope.timezoneGrouper =  function () {
        $scope.users = $filter('orderBy')($scope.users, 'timezoneOffset'); //this can easily be reversed
        var whichTimezone = 0;
        for (var kk=0; kk<$scope.users.length; kk++){
            whichTimezone = $scope.timezoneList.indexOf( $scope.users[kk].timezoneOffset );    
            if(whichTimezone !== -1 ){
                $scope.timezoneGroups[whichTimezone] = [].concat($scope.timezoneGroups[whichTimezone], $scope.users[kk]);
            }
            else{
                $scope.timezoneGroups[$scope.timezoneGroups.length] = [].concat($scope.users[kk]);
                $scope.timezoneList.push( $scope.users[kk].timezoneOffset );
                $scope.timezoneGroups[$scope.timezoneGroups.length - 1].UTCDelta = 
                    OffsetStringFormatter( $scope.users[kk].timezoneOffset );
            }
        }
        console.dir($scope.timezoneList);
        
        function OffsetStringFormatter (DeltaAsNumber) {
            var DeltaAsString = "";
            DeltaAsString = DeltaAsNumber >= 0 ? "+" : "-";
            DeltaAsString = DeltaAsString.concat(DeltaAsNumber.toString());
            return DeltaAsString;
        }
    };
  }
]);<commit_msg>fix linebreak<commit_after>'use strict';

angular.module('users.admin').controller('UserListController', ['$scope', '$filter', 'Admin',
  function ($scope, $filter, Admin) {
    Admin.query(function (data) {
      $scope.users = data;
      $scope.buildPager();
    });

    $scope.buildPager = function () {
      $scope.timezoneGroups = [];
      $scope.timezoneList = [];
      $scope.figureOutItemsToDisplay();
    };

    $scope.figureOutItemsToDisplay = function () {
      $scope.users = $filter('filter')($scope.users, {
        $: $scope.search
      });
      $scope.timezoneGrouper();
    };
      
      //takes in pre-searched array of users
      //sorts by user.timezoneOffset
      //creates array(timezones) of arrays(users in each timezone)
    $scope.timezoneGrouper =  function () {
        $scope.users = $filter('orderBy')($scope.users, 'timezoneOffset'); //this can easily be reversed
        var whichTimezone = 0;
        for (var kk=0; kk<$scope.users.length; kk++){
            whichTimezone = $scope.timezoneList.indexOf( $scope.users[kk].timezoneOffset );    
            if(whichTimezone !== -1 ){
                $scope.timezoneGroups[whichTimezone] = [].concat($scope.timezoneGroups[whichTimezone], $scope.users[kk]);
            }
            else{
                $scope.timezoneGroups[$scope.timezoneGroups.length] = [].concat($scope.users[kk]);
                $scope.timezoneList.push( $scope.users[kk].timezoneOffset );
                $scope.timezoneGroups[$scope.timezoneGroups.length - 1].UTCDelta = OffsetStringFormatter( $scope.users[kk].timezoneOffset );
            }
        }
        console.dir($scope.timezoneList);
        
        function OffsetStringFormatter (DeltaAsNumber) {
            var DeltaAsString = "";
            DeltaAsString = DeltaAsNumber >= 0 ? "+" : "-";
            DeltaAsString = DeltaAsString.concat(DeltaAsNumber.toString());
            return DeltaAsString;
        }
    };
  }
]);
{'fraction_non_alphanumeric': 0.14811057570377884, 'fraction_numerical': 0.00253613999492772, 'mean_word_length': 2.432550043516101, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '4231425', 'n_tokens_mistral': 1165, 'n_tokens_neox': 1140, 'n_words': 181}