<commit_before>#!/usr/bin/env python
# encoding: utf-8

import sys

if sys.version_info.major > 2:
    import http.server as htts_server
    import socketserver
else:
    import SimpleHTTPServer as http_server
    import SocketServer as socketserver

PORT = 8080

Handler = http_server.SimpleHTTPRequestHandler

Handler.extensions_map={
    '.manifest': 'text/cache-manifest',
    '.html': 'text/html',
    '.png': 'image/png',
    '.jpg': 'image/jpg',
    '.svg':    'image/svg+xml',
    '.css':    'text/css',
    '.js':    'application/x-javascript',
    '.md':    'text/x-markdown',
    '': 'application/octet-stream', # Default
    }

httpd = socketserver.TCPServer(("", PORT), Handler)

print("serving at port", PORT)
httpd.serve_forever()<commit_msg>fixbug for python3<commit_after>#!/usr/bin/env python
# encoding: utf-8

import sys

if sys.version_info.major > 2:
    import http.server as http_server
    import socketserver
else:
    import SimpleHTTPServer as http_server
    import SocketServer as socketserver

PORT = 8080

Handler = http_server.SimpleHTTPRequestHandler

Handler.extensions_map={
    '.manifest': 'text/cache-manifest',
    '.html': 'text/html',
    '.png': 'image/png',
    '.jpg': 'image/jpg',
    '.svg':    'image/svg+xml',
    '.css':    'text/css',
    '.js':    'application/x-javascript',
    '.md':    'text/x-markdown',
    '': 'application/octet-stream', # Default
    }

httpd = socketserver.TCPServer(("", PORT), Handler)

print("serving at port", PORT)
httpd.serve_forever()
{'fraction_non_alphanumeric': 0.15668202764976957, 'fraction_numerical': 0.008558262014483212, 'mean_word_length': 3.431486880466472, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 2}, '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': '1590855', 'n_tokens_mistral': 522, 'n_tokens_neox': 505, 'n_words': 113}