def nb_app():
    from notebook.notebookapp import NotebookApp
    app = NotebookApp()
    app.log_level = logging.DEBUG
    app.ip = '127.0.0.1'
    app.token = ''
    app.password = ''
    app.disable_check_xsrf = True
    app.initialize()
    return app.web_app
Exemplo n.º 2
0
def dask_setup(scheduler):
    app = NotebookApp()
    ip = socket.gethostbyname(socket.gethostname())
    app.ip = "0.0.0.0"
    app.initialize([])
    Run.get_context().log(
        "jupyter-url",
        "http://" + ip + ":" + str(app.port) + "/?token=" + app.token)
    Run.get_context().log("jupyter-port", app.port)
    Run.get_context().log("jupyter-token", app.token)
    Run.get_context().log("jupyter-ip", ip)
Exemplo n.º 3
0
def nb_app():
    sys.argv = ["--port=6005", "--ip=127.0.0.1", "--no-browser", "--debug"]
    from notebook.notebookapp import NotebookApp
    app = NotebookApp()
    app.log_level = logging.DEBUG
    app.ip = '127.0.0.1'
    app.token = ''
    app.password = ''
    app.disable_check_xsrf = True
    app.initialize()
    return app.web_app