<commit_before>#!/usr/bin/env python2
from SimpleHTTPServer import SimpleHTTPRequestHandler
import BaseHTTPServer

class CORSRequestHandler( SimpleHTTPRequestHandler ):
    def end_headers( self ):
        self.send_header( 'Access-Control-Allow-Origin', '*' )
        SimpleHTTPRequestHandler.end_headers(self)

if __name__ == '__main__':
    BaseHTTPServer.test( CORSRequestHandler, BaseHTTPServer.HTTPServer )<commit_msg>Add python3 support to stop Steve whinging<commit_after>try:
    from http.server import SimpleHTTPRequestHandler
    import http.server as BaseHTTPServer
except ImportError:
    from SimpleHTTPServer import SimpleHTTPRequestHandler
    import BaseHTTPServer


class CORSRequestHandler( SimpleHTTPRequestHandler ):
    def end_headers( self ):
        self.send_header( 'Access-Control-Allow-Origin', '*' )
        SimpleHTTPRequestHandler.end_headers(self)

if __name__ == '__main__':
    BaseHTTPServer.test( CORSRequestHandler, BaseHTTPServer.HTTPServer )
{'fraction_non_alphanumeric': 0.07841140529531568, 'fraction_numerical': 0.002036659877800407, 'mean_word_length': 5.14375, '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': '5271300', 'n_tokens_mistral': 272, 'n_tokens_neox': 278, 'n_words': 61}