<commit_before>'use strict';

var rightNowApp = angular.module('rightNowApp', [
    'angular-skycons',
    'ui.bootstrap'
]);

rightNowApp.controller('RightNowController', function($scope, $http, $interval) {

    // Local current weather

    var gc = new JustGage({
        id: "gauge-courthouse",
        value: 0,
        min: 0,
        max: 20,
        title: "Wind km/h"
    });


    function getCurrent() {
        $http.get('api/local.json').success(function(data) {
            $scope.courthouse = data;

            var windSpeed = data.speed * 1.60934;
            $scope.windSpeed = Math.ceil(windSpeed * 10) / 10;
            gc.refresh($scope.windSpeed);

            var degrees = 0;
            switch (data.direction) {
                case "N":
                    degrees = 0;
                    break;
                case "NE":
                    degrees = 45;
                    break;
                case "E":
                    degrees = 90;
                    break;
                case "SE":
                    degrees = 135;
                    break;
                case "S":
                    degrees = 180;
                    break;
                case "SW":
                    degrees = 225;
                    break;
                case "W":
                    degrees = 270;
                    break;
                case "NW":
                    degrees = 315;
                    break;
            }

            $scope.arrowCourthouse = {
                '-webkit-transform': 'rotate(' + degrees + 'deg)',
                '-moz-transform': 'rotate(' + degrees + 'deg)',
                '-o-transform': 'rotate(' + degrees + 'deg)',
                '-ms-transform': 'rotate(' + degrees + 'deg)',
                'transform': 'rotate(' + degrees + 'deg)'
            };
//
//            console.log(data);
        });
    }

//    setInterval(function() {
//        $scope.$apply(function() {
//           getCurrent();
//        });
//    }, 5000);<commit_msg>add timer on courthouse weather<commit_after>'use strict';

var rightNowApp = angular.module('rightNowApp', [
    'angular-skycons',
    'ui.bootstrap'
]);

rightNowApp.controller('RightNowController', function($scope, $http, $interval) {

    // Local current weather

    var gc = new JustGage({
        id: "gauge-courthouse",
        value: 0,
        min: 0,
        max: 20,
        title: "Wind km/h"
    });


    function getCurrent() {
        $http.get('api/local.json').success(function(data) {
            $scope.courthouse = data;

            var windSpeed = data.speed * 1.60934;
            $scope.windSpeed = Math.ceil(windSpeed * 10) / 10;
            gc.refresh($scope.windSpeed);

            var degrees = 0;
            switch (data.direction) {
                case "N":
                    degrees = 0;
                    break;
                case "NE":
                    degrees = 45;
                    break;
                case "E":
                    degrees = 90;
                    break;
                case "SE":
                    degrees = 135;
                    break;
                case "S":
                    degrees = 180;
                    break;
                case "SW":
                    degrees = 225;
                    break;
                case "W":
                    degrees = 270;
                    break;
                case "NW":
                    degrees = 315;
                    break;
            }

            $scope.arrowCourthouse = {
                '-webkit-transform': 'rotate(' + degrees + 'deg)',
                '-moz-transform': 'rotate(' + degrees + 'deg)',
                '-o-transform': 'rotate(' + degrees + 'deg)',
                '-ms-transform': 'rotate(' + degrees + 'deg)',
                'transform': 'rotate(' + degrees + 'deg)'
            };
//
//            console.log(data);
        });
    }

    setInterval(function() {
        $scope.$apply(function() {
           getCurrent();
        });
    }, 5000);
{'fraction_non_alphanumeric': 0.13112320633349828, 'fraction_numerical': 0.01929737753587333, 'mean_word_length': 1.0638080653394588, 'pattern_counts': {'":': 16, '<': 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': '4011346', 'n_tokens_mistral': 1170, 'n_tokens_neox': 1023, 'n_words': 231}