<s> from . import requires , today_utc <EOL> import feedparser <EOL> from dateutil import parser <EOL> """<STR_LIT>""" <EOL> COFFEE_TAG = '<STR_LIT>' <EOL> @ requires ( '<STR_LIT>' ) <EOL> def coffees ( gauge_factory , config , logger ) : <EOL> gauge = gauge_factory ( '<STR_LIT>' ) <EOL> feed = feedparser . parse ( config [ '<STR_LIT>' ] ) <EOL> entries = feed [ '<STR_LIT>' ] <EOL> today = today_utc ( ) <EOL> coffees = len ( filter ( lambda x : parser . parse ( x [ '<STR_LIT>' ] ) . date ( ) == today <EOL> and filter ( lambda t : t . term == COFFEE_TAG , x [ '<STR_LIT>' ] ) , <EOL> entries ) ) <EOL> gauge . save ( today , coffees ) <EOL> logger . info ( '<STR_LIT>' . format ( coffees , today ) ) </s>
