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

import os
import time
import BaseHTTPServer

HOST_NAME = os.getenv("OPENSHIFT_DIY_IP")
PORT_NUMBER = 8080

class MaintenanceHandler(BaseHTTPServer.BaseHTTPRequestHandler):
    def do_GET(self):
        self.curDir = os.path.dirname(os.path.realpath(__file__))

        if self.path=="/":
            self.path = "/503.html"
        # If requested file does not exists, show 503 page
        elif os.path.exists(self.curDir+self.path) == False:
            self.path = "/503.html"

        try:
            # Check extensions and set the mime type accordingly
            sendReply = False

            if self.path.endswith(".html"):
                mimetype    = "text/html"
                sendReply   = True
            if self.path.endswith(".png"):
                mimetype    = "image/png"
                sendReply   = True
            if self.path.endswith(".jpg"):
                mimetype    = "image/jpg"
                sendReply   = True
            if self.path.endswith(".gif"):<commit_msg>change python server port & ip<commit_after>#!/usr/bin/env python

import os
import time
import BaseHTTPServer

HOST_NAME = os.getenv("OPENSHIFT_NODEDIY_IP")
PORT_NUMBER = os.getenv("OPENSHIFT_NODEDIY_PORT")

class MaintenanceHandler(BaseHTTPServer.BaseHTTPRequestHandler):
    def do_GET(self):
        self.curDir = os.path.dirname(os.path.realpath(__file__))

        if self.path=="/":
            self.path = "/503.html"
        # If requested file does not exists, show 503 page
        elif os.path.exists(self.curDir+self.path) == False:
            self.path = "/503.html"

        try:
            # Check extensions and set the mime type accordingly
            sendReply = False

            if self.path.endswith(".html"):
                mimetype    = "text/html"
                sendReply   = True
            if self.path.endswith(".png"):
                mimetype    = "image/png"
                sendReply   = True
            if self.path.endswith(".jpg"):
                mimetype    = "image/jpg"
                sendReply   = True
            if self.path.endswith(".gif"):
{'fraction_non_alphanumeric': 0.10851262862488306, 'fraction_numerical': 0.01028999064546305, 'mean_word_length': 1.8256274768824305, 'pattern_counts': {'":': 2, '<': 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': '784311', 'n_tokens_mistral': 654, 'n_tokens_neox': 620, 'n_words': 137}