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

#
# threat_note v3.0                                      #
# Developed By: <NAME>                          #
# Defense Point Security (defpoint.com)                 #
# October 26, 2015                                      #
#

import argparse
import os.path
from app import app


if __name__ == '__main__':
    parser = argparse.ArgumentParser()
    parser.add_argument('-H', '--host', default="127.0.0.1", help="Specify the host IP address")
    parser.add_argument('-p', '--port', default=8888, help="Specify port to listen on")
    parser.add_argument('-d', '--debug', default=False, help="Run in debug mode", action="store_true")
    parser.add_argument('-db', '--database', help="Path to sqlite database - Not Implemented")
    args = parser.parse_args()

    if not os.path.isfile(os.path.join(os.getcwd(), 'tmp', 'test.db')):
        from app import db
        db.create_all()

    app.run(host=args.host, port=args.port, debug=args.debug)<commit_msg>adding ablility to specify database file<commit_after>#!/usr/bin/env python

#
# threat_note v3.0                                      #
# Developed By: <NAME>                          #
# Defense Point Security (defpoint.com)                 #
# October 26, 2015                                      #
#

import argparse
import os.path
from app import app


if __name__ == '__main__':
    parser = argparse.ArgumentParser()
    parser.add_argument('-H', '--host', default="127.0.0.1", help="Specify the host IP address")
    parser.add_argument('-p', '--port', default=8888, help="Specify port to listen on")
    parser.add_argument('-d', '--debug', default=False, help="Run in debug mode", action="store_true")
    parser.add_argument('-b', '--database', default="threatnote.db", help="Path to sqlite database - Not Implemented")
    args = parser.parse_args()

    database = 'test.db'

    if args.database:
        database = args.database
    if not os.path.isfile(os.path.join(os.getcwd(), 'tmp', database)):
        from app import db
        db.create_all()

    app.run(host=args.host, port=args.port, debug=args.debug)

{'fraction_non_alphanumeric': 0.14473684210526316, 'fraction_numerical': 0.016917293233082706, 'mean_word_length': 2.400958466453674, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 2, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 6, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7256610', 'n_tokens_mistral': 681, 'n_tokens_neox': 643, 'n_words': 159}