<commit_before>from earthreader.web import app


app.run(debug=True, host='0.0.0.0')
<commit_msg>Make serve.py to take host/port/debug as options<commit_after>import optparse
import socket

from earthreader.web import app


parser = optparse.OptionParser()
parser.add_option('-H', '--host',
                  default='0.0.0.0',
                  help='Host to listen.  [%default]')
parser.add_option('-p', '--port',
                  type='int',
                  default=5000,
                  help='Port number to listen.  [%default]')
parser.add_option('-d', '--debug',
                  default=False,
                  action='store_true',
                  help='Debug mode.  It makes the server possible to '
                       'automatically restart when files touched.')

options, args = parser.parse_args()
try:
    app.run(host=options.host, port=options.port, debug=options.debug)
except socket.error as e:
    parser.error(str(e))

{'fraction_non_alphanumeric': 0.1327713382507903, 'fraction_numerical': 0.012644889357218124, 'mean_word_length': 2.2646048109965635, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 2, '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': '2687697', 'n_tokens_mistral': 289, 'n_tokens_neox': 274, 'n_words': 67}