<commit_before>#! /usr/bin/env python
# -*- coding: utf-8 -*-
# Copyright (c) 2015-2016, Exa Analytics Development Team
# Distributed under the terms of the Apache License 2.0
"""
Executable
#############
"""
import argparse
import platform
#
#import os, sys
#HOME = 'J:/Alex'
#sys.path.insert(0, os.sep.join((HOME, 'workspace', 'exa', 'exa')))
#
from subprocess import Popen, PIPE
from exa._config import config


def main():
    parser = argparse.ArgumentParser(description="The exa framework launcher.")
    parser.add_argument(
        "-nb",
        "--notebook",
        action="store_true",
        help="Starts a Jupyter notebook server in the exa notebook directory.",
        required=False,
        default=False
    )
    args = parser.parse_args()
    if args.notebook == True:
        notebook()


def notebook():
    """Start the Jupyter notebook."""
    if platform.system().lower() == "windows":
        proc = Popen(["jupyter", "notebook"], shell=True,
                     cwd=config["paths"]["notebooks"], stdin=PIPE)
    else:
        proc = Popen(["jupyter notebook"], shell=True,
                     cwd=config["paths"]["notebooks"], stdin=PIPE)
    proc.wait()


if __name__ == "__main__":
    main()



#import platform
#import argparse
#import subprocess
#from exa._config import config, reconfigure
#
#
#def workflow(wkflw):
#    """
#    Execute a workflow on given computational resources.
#
#    Args:
#        wkflw: Workflow object
#        resrc: Computational resources
#    """
#    raise NotImplementedError("Workflows are currently unsupported.")
#
#
#def main():
#    """Sets up entry points and help text for executable."""
#    parser = argparse.ArgumentParser(description="Launcher for exa")
#    parser.add_argument(
#        "-up",
#        "--update",
#        action="store_true",
#        help="Update static data and extensions and launch Jupyter notebook.",
#        default=False
#    )
#    parser.add_argument(
#        "-nb",
#        "--notebook",
#        action="store_true",
#        help="Starts a Jupyter notebook server in the exa root directory.",
#        required=False,
#        default=False
#    )
#    args = parser.parse_args()
#    if args.update == True:
#        reconfigure()
#    if args.notebook == True:
#        notebook()
#
#
#
<commit_msg>wip jupterlab style<commit_after>#! /usr/bin/env python
# -*- coding: utf-8 -*-
# Copyright (c) 2015-2016, Exa Analytics Development Team
# Distributed under the terms of the Apache License 2.0
"""
Executable
#############
"""
import argparse
import platform
#
#import os, sys
#HOME = 'J:/Alex'
#sys.path.insert(0, os.sep.join((HOME, 'workspace', 'exa', 'exa')))
#
from notebook.notebookapp import main as notebook
from exa._config import config


def main():
    parser = argparse.ArgumentParser(description="The exa framework launcher.")
    parser.add_argument(
        "-nb",
        "--notebook",
        action="store_true",
        help="Starts a Jupyter notebook server in the exa notebook directory.",
        required=False,
        default=False
    )
    args = parser.parse_args()
    print(args)
    notebook()


if __name__ == "__main__":
    main()



#import platform
#import argparse
#import subprocess
#from exa._config import config, reconfigure
#
#
#def workflow(wkflw):
#    """
#    Execute a workflow on given computational resources.
#
#    Args:
#        wkflw: Workflow object
#        resrc: Computational resources
#    """
#    raise NotImplementedError("Workflows are currently unsupported.")
#
#
#def main():
#    """Sets up entry points and help text for executable."""
#    parser = argparse.ArgumentParser(description="Launcher for exa")
#    parser.add_argument(
#        "-up",
#        "--update",
#        action="store_true",
#        help="Update static data and extensions and launch Jupyter notebook.",
#        default=False
#    )
#    parser.add_argument(
#        "-nb",
#        "--notebook",
#        action="store_true",
#        help="Starts a Jupyter notebook server in the exa root directory.",
#        required=False,
#        default=False
#    )
#    args = parser.parse_args()
#    if args.update == True:
#        reconfigure()
#    if args.notebook == True:
#        notebook()
#
#
#

{'fraction_non_alphanumeric': 0.13970588235294118, 'fraction_numerical': 0.0055147058823529415, 'mean_word_length': 2.6275, 'pattern_counts': {'":': 3, '<': 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': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7610332', 'n_tokens_mistral': 1394, 'n_tokens_neox': 1336, 'n_words': 354}