<commit_before>#!/usr/bin/env python
'''Web-based file differ.

For usage, see README.md.
'''

import logging
import mimetypes
import os
import requests
import socket
import sys
from threading import Timer
import time
import webbrowser

from flask import (Flask, render_template, send_from_directory,
                   request, jsonify, Response)

import util
import argparser
import folderify


def determine_path():
    """Borrowed from wxglade.py"""
    try:
        root = __file__
        if os.path.islink (root):
            root = os.path.realpath (root)
        return os.path.dirname (os.path.abspath (root))
    except:
        print "I'm sorry, but something is wrong."
        print "There is no __file__ variable. Please contact the author."
        sys.exit()

def is_hot_reload():
    """In debug mode, Werkzeug reloads the app on any changes."""
    return os.environ.get('WERKZEUG_RUN_MAIN')


class Config:
    pass
    #TESTING=True  # not exactly sure what this does...

app = Flask(__name__)
app.config.from_object(Config)
app.config.from_envvar('WEBDIFF_CONFIG', silent=True)
<commit_msg>rm unused/missing import<commit_after>#!/usr/bin/env python
'''Web-based file differ.

For usage, see README.md.
'''

import logging
import mimetypes
import os
import requests
import socket
import sys
from threading import Timer
import time
import webbrowser

from flask import (Flask, render_template, send_from_directory,
                   request, jsonify, Response)

import util
import argparser


def determine_path():
    """Borrowed from wxglade.py"""
    try:
        root = __file__
        if os.path.islink (root):
            root = os.path.realpath (root)
        return os.path.dirname (os.path.abspath (root))
    except:
        print "I'm sorry, but something is wrong."
        print "There is no __file__ variable. Please contact the author."
        sys.exit()

def is_hot_reload():
    """In debug mode, Werkzeug reloads the app on any changes."""
    return os.environ.get('WERKZEUG_RUN_MAIN')


class Config:
    pass
    #TESTING=True  # not exactly sure what this does...

app = Flask(__name__)
app.config.from_object(Config)
app.config.from_envvar('WEBDIFF_CONFIG', silent=True)

{'fraction_non_alphanumeric': 0.09783588818755636, 'fraction_numerical': 0.0, 'mean_word_length': 3.202651515151515, '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': '3253813', 'n_tokens_mistral': 689, 'n_tokens_neox': 676, 'n_words': 220}