<commit_before>app.controller('MainCtrl', function ($rootScope, $scope, $attrs, $interval, $uibModal, HelperService, MusicService, ApiService) {

    /* Music player */
    $scope.musicservice = MusicService;
    $scope.current_time = 0;
    $scope.current_volume = 80;

    $scope.start = function() {
        // Start music service
        MusicService.init();

        // Wait for it to load...
        $rootScope.$on('ready', function(event) {

            // Start playing
            $scope.$watch('tracks', function (new_value, old_val) {
                reload(new_value);
            }, true);
            $scope.$watch('position', function (new_value, old_val) {
                reposition(new_value[0], new_value[1]);
            }, true);

            // Periodically update status
            $interval(function() {
                var time = MusicService.get_current_time();
                $scope.current_time = time;
                $scope.current_time_str = HelperService.formatTime(time);

                time = MusicService.get_duration();
                $scope.duration = time || 1;
                $scope.duration_str = HelperService.formatTime(time);

                $scope.remaining = Math.abs($scope.current_time - $scope.duration);
                $scope.remaining_str = HelperService.formatTime($scope.remaining);
            }, 1000);
        });<commit_msg>Lower default volume<commit_after>app.controller('MainCtrl', function ($rootScope, $scope, $attrs, $interval, $uibModal, HelperService, MusicService, ApiService) {

    /* Music player */
    $scope.musicservice = MusicService;
    $scope.current_time = 0;
    $scope.current_volume = 50;

    $scope.start = function() {
        // Start music service
        MusicService.init();

        // Wait for it to load...
        $rootScope.$on('ready', function(event) {

            // Start playing
            $scope.$watch('tracks', function (new_value, old_val) {
                reload(new_value);
            }, true);
            $scope.$watch('position', function (new_value, old_val) {
                reposition(new_value[0], new_value[1]);
            }, true);

            // Periodically update status
            $interval(function() {
                var time = MusicService.get_current_time();
                $scope.current_time = time;
                $scope.current_time_str = HelperService.formatTime(time);

                time = MusicService.get_duration();
                $scope.duration = time || 1;
                $scope.duration_str = HelperService.formatTime(time);

                $scope.remaining = Math.abs($scope.current_time - $scope.duration);
                $scope.remaining_str = HelperService.formatTime($scope.remaining);
            }, 1000);
        });
{'fraction_non_alphanumeric': 0.1279195113187208, 'fraction_numerical': 0.007186489399928135, 'mean_word_length': 2.0162513542795235, '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': '2531373', 'n_tokens_mistral': 787, 'n_tokens_neox': 734, 'n_words': 142}