<commit_before>#!/usr/bin/env python
"""
CLI
"""
import nbserve

def main():
    import argparse

    parser = argparse.ArgumentParser(
        prog=nbserve.__progname__,
        description=nbserve.__description__,
        version='%s %s' % (nbserve.__progname__, nbserve.__version__))

    parser.add_argument("working_directory", nargs='?', default=".", type=str)
    parser.add_argument("-p", dest="port", action="store", default=None, type=int)
    parser.add_argument("--no-debug", dest="debug", action="store_false", default=True)

    args = parser.parse_args()

    print "Ctrl-C to stop server."
    nbserve.set_working_directory(args.working_directory)
    nbserve.flask_app.run(debug=args.debug, port=args.port)

    print "Exiting."

if __name__ == "__main__":
    main()<commit_msg>minor<commit_after>#!/usr/bin/env python
"""
Command Line Interface.
"""

import nbserve
import argparse

def main():
    parser = argparse.ArgumentParser(
        prog=nbserve.__progname__,
        description=nbserve.__description__,
        version='%s %s' % (nbserve.__progname__, nbserve.__version__))

    parser.add_argument("working_directory", nargs='?', default=".", type=str)
    parser.add_argument("-p", dest="port", action="store", default=None, type=int)
    parser.add_argument("--no-debug", dest="debug", action="store_false", default=True)

    args = parser.parse_args()


    nbserve.set_working_directory(args.working_directory)

    print "Running. For usage info and options, type %s -h." % nbserve.__progname__
    print "Press Ctrl-C or similar to stop."

    nbserve.flask_app.run(debug=args.debug, port=args.port)

if __name__ == "__main__":
    main()
{'fraction_non_alphanumeric': 0.14985074626865671, 'fraction_numerical': 0.0, 'mean_word_length': 4.221183800623053, 'pattern_counts': {'":': 2, '<': 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': '2303866', 'n_tokens_mistral': 555, 'n_tokens_neox': 541, 'n_words': 104}