<s> '''<STR_LIT>''' <EOL> import os , cgi , __main__ <EOL> from google . appengine . ext . webapp import template <EOL> import wsgiref . handlers <EOL> from google . appengine . ext import webapp <EOL> from google . appengine . api import memcache <EOL> from google . appengine . ext import db <EOL> from appengine_utilities import cron <EOL> class MainPage ( webapp . RequestHandler ) : <EOL> def get ( self ) : <EOL> c = cron . Cron ( ) <EOL> query = cron . _AppEngineUtilities_Cron . all ( ) <EOL> results = query . fetch ( <NUM_LIT:1000> ) <EOL> template_values = { "<STR_LIT>" : results } <EOL> path = os . path . join ( os . path . dirname ( __file__ ) , '<STR_LIT>' ) <EOL> self . response . out . write ( template . render ( path , template_values ) ) <EOL> def post ( self ) : <EOL> if str ( self . request . get ( '<STR_LIT:action>' ) ) == '<STR_LIT>' : <EOL> cron . Cron ( ) . add_cron ( str ( self . request . get ( '<STR_LIT>' ) ) ) <EOL> elif str ( self . request . get ( '<STR_LIT:action>' ) ) == '<STR_LIT>' : <EOL> entry = db . get ( db . Key ( str ( self . request . get ( '<STR_LIT:key>' ) ) ) ) <EOL> entry . delete ( ) <EOL> query = cron . _AppEngineUtilities_Cron . all ( ) <EOL> results = query . fetch ( <NUM_LIT:1000> ) <EOL> template_values = { "<STR_LIT>" : results } <EOL> path = os . path . join ( os . path . dirname ( __file__ ) , '<STR_LIT>' ) <EOL> self . response . out . write ( template . render ( path , template_values ) ) <EOL> def main ( ) : <EOL> application = webapp . WSGIApplication ( <EOL> [ ( '<STR_LIT>' , MainPage ) ] , <EOL> debug = True ) <EOL> wsgiref . handlers . CGIHandler ( ) . run ( application ) <EOL> if __name__ == "<STR_LIT:__main__>" : <EOL> main ( ) </s>
