Comics - Explosm.net: "
Cyanide & Happiness @ Explosm.net"
A. L. Seidel
Sunday, November 30, 2008
Saturday, November 29, 2008
HELP CONTROL THE

HELP CONTROL THE HUMAN POPULATION. Have your human spayed or neutered.
if u needz sum halp, jus cut on da doted line.
picture: PhyscoticFeline. lol caption: Dengarde
''''''

Friday, November 28, 2008
Moving Average Perl Script
#!/usr/bin/perl
use strict;
use warnings;
use Text::CSV;
my $csvfile = 'Combined.csv';
my $newfile = 'averaged.csv';
my $csv = Text::CSV->new();
open (CSV, "<", $csvfile) or die "Couldn't open output file: $!";
open (OUT, ">",$newfile) or die "Couldn't open output file: $!";
my $i=0;
my $l=0;
my @time;
my $tave;
my @doppler;
my $dave;
my @hyperfine;
my $have;
my $window=2;
while () {
if ($csv->parse($_)) {
my @columns = $csv->fields();
$time[$i-int($i/$window)*$window]=$columns[0];
$doppler[$i-int($i/$window)*$window]=$columns[1];
$hyperfine[$i-int($i/$window)*$window]=$columns[2];
if($i>=$window){
for($l=0;$l<$window;$l++){
$tave+=$time[$l]/$window;
$dave+=$doppler[$l]/$window;
$have+=$hyperfine[$l]/$window;
}
print OUT "$tave \t\t $dave \t\t $have \n";
$tave=0;
$dave=0;
$have=0;
}
$i++;
} else {
my $err = $csv->error_input;
print "Failed to parse line: $err";
}
}
close CSV; close OUT;
print "\n Moving Average taken over $i lines.\n";
use strict;
use warnings;
use Text::CSV;
my $csvfile = 'Combined.csv';
my $newfile = 'averaged.csv';
my $csv = Text::CSV->new();
open (CSV, "<", $csvfile) or die "Couldn't open output file: $!";
open (OUT, ">",$newfile) or die "Couldn't open output file: $!";
my $i=0;
my $l=0;
my @time;
my $tave;
my @doppler;
my $dave;
my @hyperfine;
my $have;
my $window=2;
while (
if ($csv->parse($_)) {
my @columns = $csv->fields();
$time[$i-int($i/$window)*$window]=$columns[0];
$doppler[$i-int($i/$window)*$window]=$columns[1];
$hyperfine[$i-int($i/$window)*$window]=$columns[2];
if($i>=$window){
for($l=0;$l<$window;$l++){
$tave+=$time[$l]/$window;
$dave+=$doppler[$l]/$window;
$have+=$hyperfine[$l]/$window;
}
print OUT "$tave \t\t $dave \t\t $have \n";
$tave=0;
$dave=0;
$have=0;
}
$i++;
} else {
my $err = $csv->error_input;
print "Failed to parse line: $err";
}
}
close CSV; close OUT;
print "\n Moving Average taken over $i lines.\n";
epic sneez
epic sneez: "

epic sneez in 3,2,
maek sur 2 turn ur head tho wen u do sneez.
picture: dunno source, via our lolcat builder. lol caption: Zlol 8
''''''

vortex kitteh

vortex kitteh claims another.
picture: dunno source, via our lolcat builder. lol caption: eternal.dragon
''''''

Subscribe to:
Posts (Atom)
Blog Archive
-
▼
2008
(648)
-
▼
November
(72)
- Comics - Explosm.net
- HELP CONTROL THE
- The Best Washroom Signs
- Moving Average Perl Script
- epic sneez
- vortex kitteh
- The Night Baster
- How To Serve Chicken Wings To Men
- The Friend Zone
- Lead me not into
- Reasons for Attending Graduate School
- The lesser-known “Schrodinger’s
- Encore Presentayshe: Real-life Bambi and Thumper
- Knowledge vs Interest
- A Bunch of Rocks
- table mannerz
- Guy Fawkes Works Too
- Legal Hacks
- 2008-11-12: Sinfest
- TO ALL OUR
- God bless and thank you all who serve
- 11/10/08 PHD comic: 'I need your help'
- Nawt comin’ out
- What McCain said: “Please…”
- Iz Can Be In
- There is no snooze button
- AG Lite - Issue 379 | new thing
- Probability that an Attractive Girl is Single
- sumfink tellz me dat
- :boing:
- i can count to potato…
- Saturday Night Twelver Rage
- 2008-11-09: Sinfest
- 11/07/08 PHD comic: '2nd Desserts'
- textrovert
- The Answer
- What is it?!?
- November 07, 2008
- Will We Ever Know?
- 11/05/08 PHD comic: 'How long your Prof. thinks it...
- Billboard Backfire
- My God Was A Sign Really Necessary?
- Bush’s farewell salute to America
- who iz this
- 2008-11-06: Sinfest
- The Bretheren
- Barack Obama Elected as 44th President of United S...
- Your Husband May Be A Dick But I Bet He Hasn’t Bee...
- Lifelong fear of cats in..
- FAMILY VALUES
- INNOCENCE
- Conceding with class…
- POLITICS ARE LIKE DRIVING
- People that use units correctly
- Halp!
- Hey Florida, can I ask a favor?
- DEPRESSED ECONOMY
- BREAKING NEWS: Barack Obama Elected President
- Laser dog invasion
- SOLID FOREIGN POLICY
- Is it me or are Corgis getting EVEN STUBBIER!?
- Reasons to Play Tetris
- I’m John McCain…
- Comics - Explosm.net
- 10/31/08 PHD comic: 'The lab/office Whiteboard'
- Duct Tape use #5034:
- Halloween Pose
- Join the dark side…
- ART
- Doggiez ar kute, an I luvs dem.
- Dear Cheeseburger Jerks,
- it seems we r out of
-
▼
November
(72)

