<commit_before>'use strict';

angular.module('LatS.view1', ['ngRoute', 'angular-flot'])
.config(['$routeProvider', function($routeProvider) {
  $routeProvider.when('/view1', {
    templateUrl: 'view1/view1.html',
    controller: 'View1Ctrl'
  });
}])

.controller('View1Ctrl', ['$scope', '$interval', function($scope, $interval) {

        var now = (new Date()).getTime();
        $scope.dataset = [
            {
                data: [
                    [now, 13]
                ]
            }
        ];

        $scope.options = {
            legend: {
                show: false
            },
            xaxis: {
                mode: "time",
                minTickSize: [1, "second"]
            }
        };

        $interval(function() {
            $scope.dataset[0].data.push([(new Date()).getTime(), parseInt( Math.random() * 100) ]);
            var now = (new Date()).getTime();
            $scope.options.xaxis.min = now - 10000;
            if ($scope.dataset[0].data.length > 11) {
                $scope.dataset[0].data.splice(0, 1);
            }
        }, 1000);

    }]
);<commit_msg>Fiddling with the demo graph<commit_after>'use strict';

angular.module('LatS.view1', ['ngRoute', 'angular-flot'])
.config(['$routeProvider', function($routeProvider) {
  $routeProvider.when('/view1', {
    templateUrl: 'view1/view1.html',
    controller: 'View1Ctrl'
  });
}])

.controller('View1Ctrl', ['$scope', '$interval', function($scope, $interval) {

        var now = (new Date()).getTime();
        $scope.dataset = [
            {
                data: [
                    [now, 0]
                ]
            }
        ];

        $scope.options = {
            legend: {
                show: false
            },
            xaxis: {
                mode: "time",
                minTickSize: [1, "second"]
            }
        };

        var x = 0;
        $interval(function() {
            x++;
            if (x > 360) {
                x = 0;
            }
            $scope.dataset[0].data.push([(new Date()).getTime(), ( Math.sin(x)) ]);
            var now = (new Date()).getTime();
            $scope.options.xaxis.min = now - 10000;
            if ($scope.dataset[0].data.length > 11) {
                $scope.dataset[0].data.splice(0, 1);
            }
        }, 1000);

    }]
);
{'fraction_non_alphanumeric': 0.17396907216494845, 'fraction_numerical': 0.024484536082474227, 'mean_word_length': 1.4387434554973821, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 6, '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': '7203796', 'n_tokens_mistral': 740, 'n_tokens_neox': 680, 'n_words': 119}