<commit_before>import webapp2

class MainPage(webapp2.RequestHandler):
    def get(self):
        self.response.write(file('index.html').read())

class GoogleWebmasterVerifier(webapp2.RequestHandler):
    def get(self):
        self.response.write(file('google7e0693b4ccda33f7.html').read())

class SiteMapHandler(webapp2.RequestHandler):
    def get(self):
        self.response.headers["Content-Type"] = "application/xml"
        self.response.write(file('sitemap.xml').read())

class AboutHandler(webapp2.RequestHandler):
    def get(self):
        self.response.write(file('about.html').read())

application = webapp2.WSGIApplication([
    ('/google7e0693b4ccda33f7.html', GoogleWebmasterVerifier),
    ('/sitemap.xml', SiteMapHandler),
    ('/about.html', AboutHandler),
    ('/index.html', MainPage),
    ('/', MainPage)
], debug=True)
<commit_msg>Added caching for the html pages.<commit_after>import webapp2
from google.appengine.api import memcache

filenames = set(['about.html', 'index.html', 'sitemap.xml', 'google7e0693b4ccda33f7.html'])
def get_file(filename):
    if filename in filenames:
        return get_from_cache(filename)
    else:
        return get_from_cache('index.html')

def get_from_cache(filename):
    cached_value = memcache.get(filename)
    if cached_value is not None:
        return cached_value
    else:
        value = file(filename).read()
        memcache.add(filename, value)
        return value

class MainPage(webapp2.RequestHandler):
    def get(self):
        self.response.write(get_file('index.html'))

class GoogleWebmasterVerifier(webapp2.RequestHandler):
    def get(self):
        self.response.write(get_file('google7e0693b4ccda33f7.html'))

class SiteMapHandler(webapp2.RequestHandler):
    def get(self):
        self.response.headers["Content-Type"] = "application/xml"
        self.response.write(get_file('sitemap.xml'))

class AboutHandler(webapp2.RequestHandler):
    def get(self):
        self.response.write(get_file('about.html'))

application = webapp2.WSGIApplication([
    ('/google7e0693b4ccda33f7.html', GoogleWebmasterVerifier),
    ('/sitemap.xml', SiteMapHandler),
    ('/about.html', AboutHandler),
    ('/index.html', MainPage),
    ('/.*', MainPage)
], debug=True)

{'fraction_non_alphanumeric': 0.1409455842997324, 'fraction_numerical': 0.025423728813559324, 'mean_word_length': 4.1563218390804595, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 7}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4075283', 'n_tokens_mistral': 746, 'n_tokens_neox': 723, 'n_words': 115}