Jupyter Notebook 5.1.0 Documentationdeclare a custom handler, inherit from notebook.base.handlers.IPythonHandler. The example below[1] is a Hello World handler: 52 Chapter 11. Extending the Notebook Jupyter Notebook Documentation, Release 5.1 handlers import IPythonHandler class HelloWorldHandler(IPythonHandler): def get(self): self.finish('Hello, world!') The Jupyter Notebook server use Tornado as its web framework. For more information on how 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)]) Putting this together0 码力 | 128 页 | 1.72 MB | 1 年前3
Jupyter Notebook 5.0.0 Documentationdeclare a custom handler, inherit from notebook.base.handlers.IPythonHandler. The example below[1] is a Hello World handler: 52 Chapter 11. Extending the Notebook Jupyter Notebook Documentation, Release 5.0 handlers import IPythonHandler class HelloWorldHandler(IPythonHandler): def get(self): self.finish('Hello, world!') The Jupyter Notebook server use Tornado as its web framework. For more information on how 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)]) Putting this together0 码力 | 129 页 | 1.76 MB | 1 年前3
Jupyter Notebook 5.2.2 Documentationdeclare a custom handler, inherit from notebook.base.handlers.IPythonHandler. The example below[1] is a Hello World handler: 52 Chapter 11. Extending the Notebook Jupyter Notebook Documentation, Release 5.3 handlers import IPythonHandler class HelloWorldHandler(IPythonHandler): def get(self): self.finish('Hello, world!') The Jupyter Notebook server use Tornado as its web framework. For more information on how 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)]) Putting this together0 码力 | 129 页 | 1.73 MB | 1 年前3
Jupyter Notebook 5.0.0 Documentationexample below[1] is a Hello World handler: from notebook.base.handlers import IPythonHandler class HelloWorldHandler(IPythonHandler): def get(self): self.finish('Hello, world!') The Jupyter 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)]) Putting this together import IPythonHandler class HelloWorldHandler(IPythonHandler): def get(self): self.finish('Hello, world!') def load_jupyter_server_extension(nb_server_app): """ Called when the extension0 码力 | 184 页 | 4.40 MB | 1 年前3
Jupyter Notebook 5.1.0 Documentationexample below[1] is a Hello World handler: from notebook.base.handlers import IPythonHandler class HelloWorldHandler(IPythonHandler): def get(self): self.finish('Hello, world!') The Jupyter 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)]) Putting this together import IPythonHandler class HelloWorldHandler(IPythonHandler): def get(self): self.finish('Hello, world!') def load_jupyter_server_extension(nb_server_app): """ Called when the extension0 码力 | 184 页 | 4.36 MB | 1 年前3
Jupyter Notebook 5.2.2 Documentationexample below[1] is a Hello World handler: from notebook.base.handlers import IPythonHandler class HelloWorldHandler(IPythonHandler): def get(self): self.finish('Hello, world!') The Jupyter 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)]) Putting this together import IPythonHandler class HelloWorldHandler(IPythonHandler): def get(self): self.finish('Hello, world!') def load_jupyter_server_extension(nb_server_app): """ Called when the extension0 码力 | 183 页 | 4.36 MB | 1 年前3
Jupyter Notebook 5.4.1 Documentationdeclare a custom handler, inherit from notebook.base.handlers.IPythonHandler. The example below[1] is a Hello World handler: 54 Chapter 11. Extending the Notebook Jupyter Notebook Documentation, Release 5.4 handlers import IPythonHandler class HelloWorldHandler(IPythonHandler): def get(self): self.finish('Hello, world!') The Jupyter Notebook server use Tornado as its web framework. For more information on how 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)]) Putting this together0 码力 | 134 页 | 1.77 MB | 1 年前3
Jupyter Notebook 5.5.0 DocumentationPython: def f(x): """a docstring""" return x**2 or other languages: if (i=0; ihello %d\n", i); x += 4; } 3.4.4 LaTeX equations Courtesy of MathJax, you can include mathematical expressions ```python print "Hello World" ``` (continues on next page) 3.4. Markdown Cells 35 Jupyter Notebook Documentation, Release 5.5.0 (continued from previous page) ```javascript console.log("Hello World") ``` ``` Gives: print "Hello World" console.log("Hello World") And a table like this: | This | is | |------|------| | a | table| A nice HTML Table: This is a table 3.4.6 General HTML Because Markdown 0 码力 | 143 页 | 1.81 MB | 1 年前3
Jupyter Notebook 5.4.0 Documentationdeclare a custom handler, inherit from notebook.base.handlers.IPythonHandler. The example below[1] is a Hello World handler: 54 Chapter 11. Extending the Notebook Jupyter Notebook Documentation, Release 5.4 handlers import IPythonHandler class HelloWorldHandler(IPythonHandler): def get(self): self.finish('Hello, world!') The Jupyter Notebook server use Tornado as its web framework. For more information on how 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)]) Putting this together0 码力 | 134 页 | 1.77 MB | 1 年前3
Jupyter Notebook 5.3.1 Documentationdeclare a custom handler, inherit from notebook.base.handlers.IPythonHandler. The example below[1] is a Hello World handler: 54 Chapter 11. Extending the Notebook Jupyter Notebook Documentation, Release 5.3 handlers import IPythonHandler class HelloWorldHandler(IPythonHandler): def get(self): self.finish('Hello, world!') The Jupyter Notebook server use Tornado as its web framework. For more information on how 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)]) Putting this together0 码力 | 133 页 | 1.77 MB | 1 年前3
共 62 条
- 1
- 2
- 3
- 4
- 5
- 6
- 7













