Skip to content

Instantly share code, notes, and snippets.

@KitWallace
Created August 30, 2012 08:15
Show Gist options
  • Save KitWallace/3524073 to your computer and use it in GitHub Desktop.
Save KitWallace/3524073 to your computer and use it in GitHub Desktop.
using a cyclic sequence to model a limited history
def __init__(self) :
....
self.history = Moving_Sequence(n)
...
def monitor...
for baro in reader:
...
self.history.add(baro)
...
def updateTrend(self) :
self.trend = self.history.sum(0)
if self.trend is not None
self.tendency = conv.trend_to_tendency(self.trend)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment