Jupyter Notebook 5.1.0 Documentationfollowing example: web_app = nb_server_app.web_app host_pattern = '.*$' route_pattern = url_path_join(web_app.settings['base_url'], '/hello') web_app.add_handlers(host_pattern, [(route_pattern, HelloWorldHandler)]) with the extension code, the example looks like the following: from notebook.utils import url_path_join from notebook.base.handlers import IPythonHandler class HelloWorldHandler(IPythonHandler): def get(self): webserver ˓→instance. """ web_app = nb_server_app.web_app host_pattern = '.*$' route_pattern = url_path_join(web_app.settings['base_url'], '/hello') web_app.add_handlers(host_pattern, [(route_pattern, HelloWorldHandler)])0 码力 | 128 页 | 1.72 MB | 1 年前3
Jupyter Notebook 5.0.0 Documentationfollowing example: web_app = nb_server_app.web_app host_pattern = '.*$' route_pattern = url_path_join(web_app.settings['base_url'], '/hello') web_app.add_handlers(host_pattern, [(route_pattern, HelloWorldHandler)]) with the extension code, the example looks like the following: from notebook.utils import url_path_join from notebook.base.handlers import IPythonHandler class HelloWorldHandler(IPythonHandler): def get(self): webserver ˓→instance. """ web_app = nb_server_app.web_app host_pattern = '.*$' route_pattern = url_path_join(web_app.settings['base_url'], '/hello') web_app.add_handlers(host_pattern, [(route_pattern, HelloWorldHandler)])0 码力 | 129 页 | 1.76 MB | 1 年前3
Jupyter Notebook 5.2.2 Documentationfollowing example: web_app = nb_server_app.web_app host_pattern = '.*$' route_pattern = url_path_join(web_app.settings['base_url'], '/hello') web_app.add_handlers(host_pattern, [(route_pattern, HelloWorldHandler)]) with the extension code, the example looks like the following: from notebook.utils import url_path_join from notebook.base.handlers import IPythonHandler class HelloWorldHandler(IPythonHandler): def get(self): webserver ˓→instance. """ web_app = nb_server_app.web_app host_pattern = '.*$' route_pattern = url_path_join(web_app.settings['base_url'], '/hello') web_app.add_handlers(host_pattern, [(route_pattern, HelloWorldHandler)])0 码力 | 129 页 | 1.73 MB | 1 年前3
Jupyter Notebook 5.0.0 Documentationfollowing example: web_app = nb_server_app.web_app host_pattern = '.*$' route_pattern = url_path_join(web_app.settings['base_url'], '/hello') web_app.add_handlers(host_pattern, [(route_pattern, HelloWorldHandler)]) with the extension code, the example looks like the following: from notebook.utils import url_path_join from notebook.base.handlers import IPythonHandler class HelloWorldHandler(IPythonHandler): def instance. """ web_app = nb_server_app.web_app host_pattern = '.*$' route_pattern = url_path_join(web_app.settings['base_url'], '/hello') web_app.add_handlers(host_pattern, [(route_pattern,0 码力 | 184 页 | 4.40 MB | 1 年前3
Jupyter Notebook 5.1.0 Documentationfollowing example: web_app = nb_server_app.web_app host_pattern = '.*$' route_pattern = url_path_join(web_app.settings['base_url'], '/hello') web_app.add_handlers(host_pattern, [(route_pattern, HelloWorldHandler)]) with the extension code, the example looks like the following: from notebook.utils import url_path_join from notebook.base.handlers import IPythonHandler class HelloWorldHandler(IPythonHandler): def instance. """ web_app = nb_server_app.web_app host_pattern = '.*$' route_pattern = url_path_join(web_app.settings['base_url'], '/hello') web_app.add_handlers(host_pattern, [(route_pattern,0 码力 | 184 页 | 4.36 MB | 1 年前3
Jupyter Notebook 5.2.2 Documentationfollowing example: web_app = nb_server_app.web_app host_pattern = '.*$' route_pattern = url_path_join(web_app.settings['base_url'], '/hello') web_app.add_handlers(host_pattern, [(route_pattern, HelloWorldHandler)]) with the extension code, the example looks like the following: from notebook.utils import url_path_join from notebook.base.handlers import IPythonHandler class HelloWorldHandler(IPythonHandler): def instance. """ web_app = nb_server_app.web_app host_pattern = '.*$' route_pattern = url_path_join(web_app.settings['base_url'], '/hello') web_app.add_handlers(host_pattern, [(route_pattern,0 码力 | 183 页 | 4.36 MB | 1 年前3
Jupyter Notebook 5.4.1 Documentationfollowing example: web_app = nb_server_app.web_app host_pattern = '.*$' route_pattern = url_path_join(web_app.settings['base_url'], '/hello') web_app.add_handlers(host_pattern, [(route_pattern, HelloWorldHandler)]) with the extension code, the example looks like the following: from notebook.utils import url_path_join from notebook.base.handlers import IPythonHandler class HelloWorldHandler(IPythonHandler): def get(self): webserver ˓→instance. """ web_app = nb_server_app.web_app host_pattern = '.*$' route_pattern = url_path_join(web_app.settings['base_url'], '/hello') web_app.add_handlers(host_pattern, [(route_pattern, HelloWorldHandler)])0 码力 | 134 页 | 1.77 MB | 1 年前3
Jupyter Notebook 5.5.0 Documentationjupyter_config_dir() jupyter_dir and custom js is in In [ ]: import os.path custom_js_path = os.path.join(jupyter_dir, 'custom', 'custom.js') In [ ]: # my custom js if os.path.isfile(custom_js_path): with Notebook Documentation, Release 5.5.0 if not path: path = [''] for d in path: nb_path = os.path.join(d, name + ".ipynb") if os.path.isfile(nb_path): return nb_path # let import Notebook_Name find "Notebook me, path) if not nb_path: return key = path if path: # lists aren't hashable key = os.path.sep.join(path) if key not in self.loaders: self.loaders[key] = NotebookLoader(path) return self.loaders[key]0 码力 | 143 页 | 1.81 MB | 1 年前3
Jupyter Notebook 5.4.0 Documentationfollowing example: web_app = nb_server_app.web_app host_pattern = '.*$' route_pattern = url_path_join(web_app.settings['base_url'], '/hello') web_app.add_handlers(host_pattern, [(route_pattern, HelloWorldHandler)]) with the extension code, the example looks like the following: from notebook.utils import url_path_join from notebook.base.handlers import IPythonHandler class HelloWorldHandler(IPythonHandler): def get(self): webserver ˓→instance. """ web_app = nb_server_app.web_app host_pattern = '.*$' route_pattern = url_path_join(web_app.settings['base_url'], '/hello') web_app.add_handlers(host_pattern, [(route_pattern, HelloWorldHandler)])0 码力 | 134 页 | 1.77 MB | 1 年前3
Jupyter Notebook 5.3.1 Documentationfollowing example: web_app = nb_server_app.web_app host_pattern = '.*$' route_pattern = url_path_join(web_app.settings['base_url'], '/hello') web_app.add_handlers(host_pattern, [(route_pattern, HelloWorldHandler)]) with the extension code, the example looks like the following: from notebook.utils import url_path_join from notebook.base.handlers import IPythonHandler class HelloWorldHandler(IPythonHandler): def get(self): webserver ˓→instance. """ web_app = nb_server_app.web_app host_pattern = '.*$' route_pattern = url_path_join(web_app.settings['base_url'], '/hello') web_app.add_handlers(host_pattern, [(route_pattern, HelloWorldHandler)])0 码力 | 133 页 | 1.77 MB | 1 年前3
共 62 条
- 1
- 2
- 3
- 4
- 5
- 6
- 7













