<commit_before>app
  .controller('MainCtrl', ['$scope',
    function($scope) {
    }
  ]);
<commit_msg>Add more stuff to the main controller<commit_after>app.controller('MainCtrl', ['$scope', 'User',
        function($scope, User) {
            $scope.initMain = function() {
                $scope.checkLoggedIn();
            };

            $scope.checkLoggedIn = function() {
                User.checkLoggedIn().then(function(data) {
                    console.log("User logged in? %o", data);
                }).catch(function(data) {
                    console.error("ERROR! %o", data);
                });
            };

            // ============= Watch =============
            $scope.user = User.getUser();
            $scope.$on('user.update', function(event) {
                $scope.user = User.getUser();
            });

            $scope.isLoggedIn = User.getIsLoggedIn();
            $scope.$on('user.loggedin.status', function(event) {
                $scope.isLoggedIn = User.getIsLoggedIn();
            });
        }
]);

{'fraction_non_alphanumeric': 0.17921830314585319, 'fraction_numerical': 0.0, 'mean_word_length': 1.6649746192893402, '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': '398502', 'n_tokens_mistral': 297, 'n_tokens_neox': 285, 'n_words': 43}