本文整理汇总了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