<commit_before>(function() {
  'use strict';

  /**
   * Specify controller for iot.demo module.
   *
   * @namespace Controllers
   */
  angular
    .module('iot.temperature')
    .controller('TemperatureController', TemperatureController)
  ;
    
  /**
   * @desc      Controller implementation for /demo route.
   * @namespace Demo
   * @memberOf  Controllers
   * @ngInject
   *
   * @constructor
   */
  function TemperatureController($scope, TemperatureService, dataservice, toastr, _temperatures, _latest, _power, _currentStep, _program) {
    var vm = this;

    let balls = document.getElementsByClassName('ball');
    let ballStates = [];

    for (let i = balls.length; i > 0; i--) {
        let size = Math.random()*200;
        ballStates[i-1] = {};
        ballStates[i-1].width = (~~size);
        ballStates[i-1].height = (~~size);
        ballStates[i-1].left = (window.innerWidth * Math.random()) - ((~~size)/2)
        ballStates[i-1].top = window.innerHeight + (Math.random()*2000);

        balls[i-1].style.width = (~~size)+'px';
        balls[i-1].style.height = (~~size)+'px';
        balls[i-1].style.top = (~~ballStates[i-1].top) + 'px';
        balls[i-1].style.left = (~~ballStates[i-1].left) + 'px';
    }

    (function tick() {      
      for (let i = balls.length; i > 0; i--) {
          ballStates[i-1].top = ballStates[i-1].top - 1;
          if (ballStates[i-1].top < (-ballStates[i-1].height)) {
            ballStates[i-1].top = window.innerHeight + (2*ballStates[i-1].height);
            ballStates[i-1].left = (window.innerWidth * Math.random()) - (ballStates[i-1].width/2)
          }
          balls[i-1].style.top = (~~ballStates[i-1].top) + 'px';
      }
      setTimeout(function(){tick()}, 66);
    })();

    dataservice.getReference('Power').on('value', function(snapshot){
        vm.power.state = snapshot.val().state;
    });

    vm.temperatures = _temperatures;
    vm.latest = _latest;
    vm.power = _power;
    vm.currentStep = _currentStep;
    vm.currentTemp = null;
    vm.power = {state: false};
    vm.temperatureTolerance = 1.5;
    vm.estimatedSecsToTarget = null;
    vm.program = _program;

      var step = {
          duration: null,<commit_msg>Fix usage of let instead of var<commit_after>(function() {
  'use strict';

  /**
   * Specify controller for iot.demo module.
   *
   * @namespace Controllers
   */
  angular
    .module('iot.temperature')
    .controller('TemperatureController', TemperatureController)
  ;
    
  /**
   * @desc      Controller implementation for /demo route.
   * @namespace Demo
   * @memberOf  Controllers
   * @ngInject
   *
   * @constructor
   */
  function TemperatureController($scope, TemperatureService, dataservice, toastr, _temperatures, _latest, _power, _currentStep, _program) {
    var vm = this;

    var balls = document.getElementsByClassName('ball');
    var ballStates = [];

    for (var i = balls.length; i > 0; i--) {
        var size = Math.random()*200;
        ballStates[i-1] = {};
        ballStates[i-1].width = (~~size);
        ballStates[i-1].height = (~~size);
        ballStates[i-1].left = (window.innerWidth * Math.random()) - ((~~size)/2)
        ballStates[i-1].top = window.innerHeight + (Math.random()*2000);

        balls[i-1].style.width = (~~size)+'px';
        balls[i-1].style.height = (~~size)+'px';
        balls[i-1].style.top = (~~ballStates[i-1].top) + 'px';
        balls[i-1].style.left = (~~ballStates[i-1].left) + 'px';
    }

    (function tick() {      
      for (var i = balls.length; i > 0; i--) {
          ballStates[i-1].top = ballStates[i-1].top - 1;
          if (ballStates[i-1].top < (-ballStates[i-1].height)) {
            ballStates[i-1].top = window.innerHeight + (2*ballStates[i-1].height);
            ballStates[i-1].left = (window.innerWidth * Math.random()) - (ballStates[i-1].width/2)
          }
          balls[i-1].style.top = (~~ballStates[i-1].top) + 'px';
      }
      setTimeout(function(){tick()}, 66);
    })();

    dataservice.getReference('Power').on('value', function(snapshot){
        vm.power.state = snapshot.val().state;
    });

    vm.temperatures = _temperatures;
    vm.latest = _latest;
    vm.power = _power;
    vm.currentStep = _currentStep;
    vm.currentTemp = null;
    vm.power = {state: false};
    vm.temperatureTolerance = 1.5;
    vm.estimatedSecsToTarget = null;
    vm.program = _program;

      var step = {
          duration: null,
{'fraction_non_alphanumeric': 0.17446043165467626, 'fraction_numerical': 0.0170863309352518, 'mean_word_length': 2.5114443567482243, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 7, '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': '3953307', 'n_tokens_mistral': 1529, 'n_tokens_neox': 1482, 'n_words': 265}