Warning: Declaration of Graphene_Description_Walker::start_el(&$output, $item, $depth, $args) should be compatible with Walker_Nav_Menu::start_el(&$output, $item, $depth = 0, $args = Array, $id = 0) in /homepages/41/d29721102/htdocs/wp/wp-content/themes/graphene/functions.php on line 716

Warning: Declaration of Walker_PageDescription::start_el(&$output, $page, $depth, $args, $current_page) should be compatible with Walker_Page::start_el(&$output, $page, $depth = 0, $args = Array, $current_page = 0) in /homepages/41/d29721102/htdocs/wp/wp-content/themes/graphene/functions.php on line 816
python » Dominik Schmidt

Tag Archive: python


Simple Moving Average Filter in Python

Just a simple moving average filter implementation as Python class, nothing more. class MovingAverageFilter: """Simple moving average filter"""   @property def avg(self): """Returns current moving average value""" return self.__avg   def __init__(self, n = 8, initial_value = 0): """Inits filter with window size n and initial value""" self.__n = n self.__buffer = [initial_value/n]*n self.__avg = …

Continue reading »