Vista 64bit doesn't seem to like me at the moment as I am having issues installing software.
Fortunately, for the project and the timeline I have, I can easily switch to Linux as I am doing currently for the sole purpose of adding graphs.
Now this causes a problem in that I wanted to port this app using the Ruby2exe application, and while that application will create a Windows exe from within Linux - the problem is that the graphing was initially going to be done with Gruff and that requires ImageMagick to be installed in one form or another on the target system.
So, I'll have to root around for another graphing subsystem or perhaps use jRuby (which I would like to avoid at all costs because it's not portable in a way that is simple for the end user).
total = 0
seq.each do |line|
total += line
return sum(seq) / seq.size.to_f
def moving_average(seq, num)
total = 
pad = num - 1
1.upto(pad) do |line|
total << 0
num.upto(seq.size) do |line|
total << mean(seq.slice(line - num, num))