<commit_before>#!/usr/bin/env python

import tornado.web
import os
import uuid

class UploadHandler(tornado.web.RequestHandler):
    def post(self):
        fileinfo = self.request.files['filearg'][0]
        print 'hi'
        print "fileinfo is", fileinfo.keys()
        fname = fileinfo['filename']
        extn = os.path.splitext(fname)[-1]
        cname = str(uuid.uuid4()) + extn
        if not os.exists(os.path.join(os.getcwd(), '/uploads')):
            os.mkdirs(os.path.join(os.getcwd(), '/uploads')):
        fh = open('uploads/' + cname, 'w')
        fh.write(fileinfo['body'])
        self.finish(cname + " is uploaded!! Check uploads folder")


    def get(self):
        self.render("upload.html")<commit_msg>Remove broken code<commit_after>#!/usr/bin/env python

import tornado.web
import os
import uuid

class UploadHandler(tornado.web.RequestHandler):
    def post(self):
        fileinfo = self.request.files['filearg'][0]
        print 'hi'
        print "fileinfo is", fileinfo.keys()
        fname = fileinfo['filename']
        extn = os.path.splitext(fname)[-1]
        cname = str(uuid.uuid4()) + extn
        if not os.exists(os.path.join(os.getcwd(), '/uploads')):
            os.mkdirs(os.path.join(os.getcwd(), '/uploads'))
        fh = open('uploads/' + cname, 'w')
        fh.write(fileinfo['body'])
        self.finish(cname + " is uploaded!! Check uploads folder")


    def get(self):
        self.render("upload.html")
{'fraction_non_alphanumeric': 0.16162310866574967, 'fraction_numerical': 0.0041265474552957355, 'mean_word_length': 2.7022900763358777, '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': '172960', 'n_tokens_mistral': 500, 'n_tokens_neox': 481, 'n_words': 95}