Moving Average by pooq

a:stdin.get_s(4K).split("
").to_a;b:a.map(|x|x.slice(7,13).to_f).to_a;w:0;300.times{w+=b[it]-(it<5?0:b[it-5]);%f"%s Average: %.1f"(a[it],w/(it<4?it+1:5)).p;}

Note that non-ascii characters in the above source code will be escaped (such as \x9f).

download

return to the top page