<commit_before>app.controller("mainController", function($scope, $http, $resource){
 
    $http.defaults.headers.common['Authorization'] = 'Basic ' + Base64.encode('<EMAIL>:idathik');
    
    $scope.categories = [];
    var Category = $resource('http://localhost:port/api/categories/:categoryId', {categoryId:'@id', port: ':5000'});
    
    $scope.init = function() {
        $scope.categories = Category.query(function() {
        
        });
//        var q = {order_by: [{field: "name", direction: "asc"}]};
//        $http.get('http://localhost:5000/api/categories').success(function(data, status, headers, config) {
//            As we are getting our data from an external source, we need to format the data so we can use it to our desired affect
//            For each day get all the episodes
//            angular.forEach(data.categories, function(category, index){
//                $scope.categories.push(category);
//            });
//        }).error(function(data, status, headers, config) {
//
//        });
    };
});<commit_msg>Cleaned up the mainController code<commit_after>app.controller("mainController", function($scope, $http, $resource){
 
    $http.defaults.headers.common['Authorization'] = 'Basic ' + Base64.encode('<EMAIL>:idathik');
    
    $scope.categories = [];
    var Category = $resource('http://localhost:port/api/categories/:categoryId', {categoryId:'@id', port: ':5000'});
    
    $scope.init = function() {
        $scope.categories = Category.query();
    };
});
{'fraction_non_alphanumeric': 0.1771731917717319, 'fraction_numerical': 0.010617120106171201, 'mean_word_length': 3.053763440860215, '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': '4943218', 'n_tokens_mistral': 437, 'n_tokens_neox': 422, 'n_words': 91}