#!/usr/bin/env python # coding: utf-8 # # Markdown Cells # Text can be added to Jupyter Notebooks using Markdown cells. Markdown is a popular markup language that is a superset of HTML. Its specification can be found here: # # # ## Markdown basics # Press `Enter` or double click to edit a Markdown cell. Press `Shift-Enter` to render a Markdown cell. # You can make text *italic* or **bold**. # You can build nested itemized or enumerated lists: # # * One # - Sublist # - This # - Sublist # - That # - The other thing # * Two # - Sublist # * Three # - Sublist # # Now another list: # # 1. Here we go # 1. Sublist # 1. Sublist # 1. There we go # 1. Now this # ### Exercise # Create a Markdown cell and try the following constructs: # # * Bold and italic text # * Itemized and enumerated lists # ## More elements # You can add horizontal rules: # # --- # Here is a blockquote: # # > Beautiful is better than ugly. # > Explicit is better than implicit. # > Simple is better than complex. # > Complex is better than complicated. # > Flat is better than nested. # > Sparse is better than dense. # > Readability counts. # > Special cases aren't special enough to break the rules. # > Although practicality beats purity. # > Errors should never pass silently. # > Unless explicitly silenced. # > In the face of ambiguity, refuse the temptation to guess. # > There should be one-- and preferably only one --obvious way to do it. # > Although that way may not be obvious at first unless you're Dutch. # > Now is better than never. # > Although never is often better than *right* now. # > If the implementation is hard to explain, it's a bad idea. # > If the implementation is easy to explain, it may be a good idea. # > Namespaces are one honking great idea -- let's do more of those! # And shorthand for links: # # [Jupyter's website](http://jupyter.org) # ## Headings # If you want, you can add headings using Markdown's syntax: # # # Heading 1 # # Heading 2 # ## Heading 2.1 # ## Heading 2.2 # ## Embedded code # You can embed code meant for illustration instead of execution in Python: # # def f(x): # """a docstring""" # return x**2 # # or other languages: # # if (i=0; i # # Header 1 # Header 2 # # # row 1, cell 1 # row 1, cell 2 # # # row 2, cell 1 # row 2, cell 2 # # # ## Github Flavored Markdown # The Notebook webapp support Github flavored markdown meaning that you can use triple backticks for code blocks #
# ```python
# print("Hello World")
# ```
# 
# ```javascript
# console.log("Hello World")
# ```
# 
# # Gives # ```python # print("Hello World") # ``` # # ```javascript # console.log("Hello World") # ``` # # And a table like this : # #
# | This | is   |
# |------|------|
# |   a  | table| 
# 
# # A nice Html Table # # | This | is | # |------|------| # | a | table| # ## Local files # In[2]: get_ipython().system('ls *svg *m4v') # If you have local files in your Notebook directory, you can refer to these files in Markdown cells via relative URLs that are prefixed with `files/`: # # files/[subdirectory/] # # Note that it is **not** `/files`. # # For example, in the `figs` subdirectory, we have the Python logo: # # ![img](files/python-logo.svg) # # and a video with the HTML5 video tag: # #