This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | export BASH_SILENCE_DEPRECATION_WARNING=1 | |
| export LANG=en_US.UTF-8 | |
| export LC_ALL=$LANG | |
| genpasswd() { pwgen -Bs $1 1 |pbcopy |pbpaste; echo “Has been copied to clipboard” | |
| } | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | public class ExponentialMovingAverage { | |
| private double alpha; // Smoothing factor 0-1. 1 calculate the average as latest value. | |
| private Double average; | |
| public ExponentialMovingAverage(double alpha) { | |
| this.alpha = alpha; | |
| } | |
| public void add(double value) { | |
| if (average == null) { | |
| average = value; // Initialize average with the first value | 
OlderNewer