First import

git-svn-id: http://photonzero.com/dotfiles/trunk@1 23f722f6-122a-0410-8cef-c75bd312dd78
This commit is contained in:
michener 2007-03-19 06:17:17 +00:00
commit 83d40113d2
60 changed files with 4264 additions and 0 deletions

21
bin/movingaverage Executable file
View file

@ -0,0 +1,21 @@
#!/usr/bin/perl
$averageto = $ARGV[0];
for ($i = 0; $i < $averageto; $i++) {
$temp[$i] = 0;
}
while (<STDIN>) {
chomp;
$x = 0;
for ($i = 0; $i < $averageto; $i++) {
$x += $temp[$i];
}
$x = $x + $_;
$x = $x / ($averageto + 1);
print "$x\n";
for ($i = 0; $i < $averageto - 1; $i++) {
$temp[$i] = $temp[($i + 1)];
}
$temp[($averageto -1)] = $_;
}