本文整理匯總了Python中notebook.notebookapp.NotebookApp方法的典型用法代碼示例。如果您正苦於以下問題:Python notebookapp.NotebookApp方法的具體用法?Python notebookapp.NotebookApp怎麽用?Python notebookapp.NotebookApp使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類notebook.notebookapp
的用法示例。
在下文中一共展示了notebookapp.NotebookApp方法的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: load_jupyter_server_extension
# 需要導入模塊: from notebook import notebookapp [as 別名]
# 或者: from notebook.notebookapp import NotebookApp [as 別名]
def load_jupyter_server_extension(notebook_app: NotebookApp):
setup_handlers(notebook_app.web_app)
示例2: pwnbook
# 需要導入模塊: from notebook import notebookapp [as 別名]
# 或者: from notebook.notebookapp import NotebookApp [as 別名]
def pwnbook(_parser, cmd, args): # pragma: no cover
"""
Start a jupyter notebook with the pwnypack enhanced kernel pre-loaded.
"""
notebook = NotebookApp(kernel_spec_manager_class=KSM)
notebook.initialize(args)
notebook.start()
示例3: main
# 需要導入模塊: from notebook import notebookapp [as 別名]
# 或者: from notebook.notebookapp import NotebookApp [as 別名]
def main():
current_directory = os.path.dirname(os.path.realpath(__file__))
TestPlugin.app = NotebookApp(open_browser=False, notebook_dir=current_directory)
TestPlugin.app.initialize()
TestPlugin.mock_docker = MagicMock()
io_loop = IOLoop.current()
io_loop.call_later(1, _run_tests_in_thread)
with patch("docker.from_env", return_value=TestPlugin.mock_docker):
TestPlugin.app.start()
示例4: __init__
# 需要導入模塊: from notebook import notebookapp [as 別名]
# 或者: from notebook.notebookapp import NotebookApp [as 別名]
def __init__(self, nbapp: NotebookApp):
self.config = nbapp.web_app.settings["nbresuse_display_config"]
self.nbapp = nbapp
示例5: nb_app
# 需要導入模塊: from notebook import notebookapp [as 別名]
# 或者: from notebook.notebookapp import NotebookApp [as 別名]
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'
# TODO: Add auth check tests
app.token = ''
app.password = ''
app.disable_check_xsrf = True
app.initialize()
return app.web_app