<commit_before>#!/usr/bin/env python
"""Running this file starts the Flask server"""

from os import walk, path, environ
from app import flask_app

__author__ = "<NAME>"

"""This goes through all the files in client and adds them a list called
extra_files. Passed into the run function, the server knows to watch all
the files in the client folder for changes. This is extremely useful when
developing the app, but should be removed when the app is in production.
"""
if "HEROKU" not in environ:
    extra_dirs = ['app/client']
    extra_files = extra_dirs[:]
    for extra_dir in extra_dirs:
        for dirname, dirs, files in walk(extra_dir):
            if 'bower_components' in dirs:
                dirs.remove('bower_components')
            for filename in files:
                filename = path.join(dirname, filename)
                if path.isfile(filename):
                    extra_files.append(filename)

"""This starts the Flask server"""
if "HEROKU" in environ:
    flask_app.run()
else:
    flask_app.run(debug=True, extra_files=extra_files)<commit_msg>Server know connects to Heroku ports when on heroku rather than localhost 5000<commit_after>#!/usr/bin/env python
"""Running this file starts the Flask server"""

from os import walk, path, environ
from app import flask_app

__author__ = "<NAME>"

"""This goes through all the files in client and adds them a list called
extra_files. Passed into the run function, the server knows to watch all
the files in the client folder for changes. This is extremely useful when
developing the app, but should be removed when the app is in production.
"""
if "HEROKU" not in environ:
    extra_dirs = ['app/client']
    extra_files = extra_dirs[:]
    for extra_dir in extra_dirs:
        for dirname, dirs, files in walk(extra_dir):
            if 'bower_components' in dirs:
                dirs.remove('bower_components')
            for filename in files:
                filename = path.join(dirname, filename)
                if path.isfile(filename):
                    extra_files.append(filename)

"""This starts the Flask server"""
if "HEROKU" in environ:
    port = int(environ.get('PORT', 5000))
    flask_app.run(host='0.0.0.0', port=port)
else:
    flask_app.run(debug=True, extra_files=extra_files)
{'fraction_non_alphanumeric': 0.08751099384344767, 'fraction_numerical': 0.005277044854881266, 'mean_word_length': 3.1514598540145986, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 1, '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': '1719167', 'n_tokens_mistral': 671, 'n_tokens_neox': 654, 'n_words': 255}