<commit_before>import flask, os
from flask import Flask, url_for
from flask.ext.mongoengine import MongoEngine
from flask.ext.login import LoginManager, current_user
from flask.ext.bcrypt import Bcrypt
from flask.ext.socketio import SocketIO, emit
from functools import wraps
from gevent import monkey

# Setup the app object
monkey.patch_all()

app = Flask(__name__)

# Setup BCrypt
flask_bcrypt = Bcrypt(app)

# Setup the Database
host = os.environ.get('MONGODB_HOST')
if host:
    app.config['MONGODB_HOST'] = host
    app.config['MONGODB_PORT'] = os.environ.get('MONGODB_PORT')
    app.config['MONGODB_DB'] = os.environ.get('MONGODB_DB')
    app.config['MONGODB_USERNAME'] = os.environ.get('MONGODB_USERNAME')
    app.config['MONGODB_PASSWORD'] = os.environ.get('MONGODB_PASSWORD')
    app.config['SECRET_KEY'] = os.environ.get('SECRET_KEY')
    app.config['TEST'] = False
else:
    app.config.from_pyfile('mongo_config.cfg')
    app.config['TEST'] = True
    app.config['DEBUG'] = True
socketio = SocketIO(app)
print(socketio)
db = MongoEngine(app)

# Setup the login system
login_manager = LoginManager()
login_manager.init_app(app)

# Setup File Uploads
# UPLOAD_FOLDER = '/static/uploads/'
UPLOAD_FOLDER = '/static/uploads'<commit_msg>Revert unneeded change<commit_after>import flask, os
from flask import Flask, url_for
from flask.ext.mongoengine import MongoEngine
from flask.ext.login import LoginManager, current_user
from flask.ext.bcrypt import Bcrypt
from flask.ext.socketio import SocketIO, emit
from functools import wraps
from gevent import monkey

# Setup the app object
monkey.patch_all()

app = Flask(__name__)

# Setup BCrypt
flask_bcrypt = Bcrypt(app)

# Setup the Database
host = os.environ.get('MONGODB_HOST')
if host:
    app.config['MONGODB_HOST'] = host
    app.config['MONGODB_PORT'] = os.environ.get('MONGODB_PORT')
    app.config['MONGODB_DB'] = os.environ.get('MONGODB_DB')
    app.config['MONGODB_USERNAME'] = os.environ.get('MONGODB_USERNAME')
    app.config['MONGODB_PASSWORD'] = os.environ.get('MONGODB_PASSWORD')
    app.config['SECRET_KEY'] = os.environ.get('SECRET_KEY')
    app.config['TEST'] = False
else:
    app.config.from_pyfile('mongo_config.cfg')
    app.config['TEST'] = True
    app.config['DEBUG'] = True

socketio = SocketIO(app)
db = MongoEngine(app)

# Setup the login system
login_manager = LoginManager()
login_manager.init_app(app)

# Setup File Uploads
# UPLOAD_FOLDER = '/static/uploads/'
UPLOAD_FOLDER = '/static/uploads'
{'fraction_non_alphanumeric': 0.12419354838709677, 'fraction_numerical': 0.0, 'mean_word_length': 5.2180451127819545, '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': '3791751', 'n_tokens_mistral': 914, 'n_tokens_neox': 904, 'n_words': 182}