<commit_before>#!/usr/bin/pythonrequire 'rubygems'
from twisted.web import server, resource
from twisted.internet import reactor
from twisted.internet import task

class Simple(resource.Resource):
    isLeaf = True
    def __init__(self):
        self.list_to_return = []

    def process_outstanding(self):
        print self.list_to_return
        for request in self.list_to_return:
            request.write("hello there")
            request.finish()
        self.list_to_return = []

    def render_GET(self, request):
        self.list_to_return.append(request)
        return server.NOT_DONE_YET

s = Simple()
site = server.Site(s)
l = task.LoopingCall(s.process_outstanding)
l.start(5)
reactor.listenTCP(8080, site)
reactor.run()
<commit_msg>playing with twisted<commit_after>#!/usr/bin/python
from twisted.web import server, resource, error
from twisted.internet import reactor
from twisted.internet import task

class Simple(resource.Resource):
    isLeaf = True
    def __init__(self):
        self.list_to_return = []

    def process_outstanding(self):
        print self.list_to_return
        for request in self.list_to_return:
            request.write("hello there")
            request.finish()
        self.list_to_return = []

    def render_GET(self, request):
        self.list_to_return.append(request)
        return server.NOT_DONE_YET

s = error.Error("Page not found")
site = server.Site(s)
#l = task.LoopingCall(s.process_outstanding)
#l.start(5)
reactor.listenTCP(8080, site)
reactor.run()

{'fraction_non_alphanumeric': 0.1012491781722551, 'fraction_numerical': 0.006574621959237344, 'mean_word_length': 3.3485714285714288, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, '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': '1134228', 'n_tokens_mistral': 488, 'n_tokens_neox': 472, 'n_words': 104}