<commit_before>import tornado.ioloop
import tornado.httpserver
import tornado.web
import argparse
import numpy as np
import gc


class MainHandler(tornado.web.RequestHandler):
    def get(self):
        self.write("Hello, world")


class CpuHandler(tornado.web.RequestHandler):
    def get(self):
        x, y = np.ogrid[-2:1:100j, -1.5:1.5:100j]

        # Increase this to improve the shape of the fractal
        iterations = 3

        c = x + 1j*y

        z = reduce(lambda x, y: x**2 + c, [1] * iterations, c)
        self.write(",".join(str(num) for num in np.angle(z)))


class MemoryHandler(tornado.web.RequestHandler):
    data = []

    def get(self):
        self.data.append(1)


class DiskHandler(tornado.web.RequestHandler):
    data = []

    def get(self):
        with open("test.tmp", "w") as f:
            f.write("Hello world!\n")


class SleepHandler(tornado.web.RequestHandler):
    @tornado.gen.coroutine
    def get(self):
        yield tornado.gen.sleep(np.random.lognormal(mean=-1.63, sigma=0.7))


class SleepyHandler(tornado.web.RequestHandler):
    @tornado.gen.coroutine
    def get(self):
        if np.random.rand() < 0.99:
            yield tornado.gen.sleep(
                np.random.lognormal(mean=-2, sigma=0.7))
        else:
            yield tornado.gen.sleep(
                np.random.lognormal(mean=1, sigma=0.25))


def make_app():
    return tornado.web.Application([
        (r"/", MainHandler),
        (r"/cpu", CpuHandler),
        (r"/mem", MemoryHandler),
        (r"/disk", DiskHandler),
        (r"/sleep", SleepHandler),
        (r"/1", MainHandler),
        (r"/2", CpuHandler),
        (r"/3", MemoryHandler),
        (r"/4", DiskHandler),
        (r"/5", SleepHandler),
        (r"/5star", SleepyHandler),<commit_msg>fix sleep time<commit_after>import tornado.ioloop
import tornado.httpserver
import tornado.web
import argparse
import numpy as np
import gc


class MainHandler(tornado.web.RequestHandler):
    def get(self):
        self.write("Hello, world")


class CpuHandler(tornado.web.RequestHandler):
    def get(self):
        x, y = np.ogrid[-2:1:100j, -1.5:1.5:100j]

        # Increase this to improve the shape of the fractal
        iterations = 3

        c = x + 1j*y

        z = reduce(lambda x, y: x**2 + c, [1] * iterations, c)
        self.write(",".join(str(num) for num in np.angle(z)))


class MemoryHandler(tornado.web.RequestHandler):
    data = []

    def get(self):
        self.data.append(1)


class DiskHandler(tornado.web.RequestHandler):
    data = []

    def get(self):
        with open("test.tmp", "w") as f:
            f.write("Hello world!\n")


class SleepHandler(tornado.web.RequestHandler):
    @tornado.gen.coroutine
    def get(self):
        yield tornado.gen.sleep(np.random.lognormal(mean=-1.63, sigma=0.7))


class SleepyHandler(tornado.web.RequestHandler):
    @tornado.gen.coroutine
    def get(self):
        if np.random.rand() < 0.99:
            yield tornado.gen.sleep(
                np.random.lognormal(mean=-1.63, sigma=0.7))
        else:
            yield tornado.gen.sleep(
                np.random.lognormal(mean=1, sigma=0.25))


def make_app():
    return tornado.web.Application([
        (r"/", MainHandler),
        (r"/cpu", CpuHandler),
        (r"/mem", MemoryHandler),
        (r"/disk", DiskHandler),
        (r"/sleep", SleepHandler),
        (r"/1", MainHandler),
        (r"/2", CpuHandler),
        (r"/3", MemoryHandler),
        (r"/4", DiskHandler),
        (r"/5", SleepHandler),
        (r"/5star", SleepyHandler),
{'fraction_non_alphanumeric': 0.15148960089938168, 'fraction_numerical': 0.021922428330522766, 'mean_word_length': 2.4155470249520152, 'pattern_counts': {'":': 0, '<': 5, '<?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': '2074484', 'n_tokens_mistral': 1280, 'n_tokens_neox': 1188, 'n_words': 251}