Skip to content

Instantly share code, notes, and snippets.

@spion
Created May 3, 2012 14:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save spion/2585933 to your computer and use it in GitHub Desktop.
Save spion/2585933 to your computer and use it in GitHub Desktop.
lst = []
while (true):
lst.push(float(S.readline()))
if (lst.length == 60):
avg = reduce(lambda (s, x): s = s + x, lst) / lst.length
lst = []
postToServer(avg)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment