Examples

Here are some code examples to test out the theme.

Sub-Heading

This is a second level heading (h2).

Sub-Sub-Heading

This is a third level heading (h3).

Code

Here is some inline code text and:

multiline
code text

It also works with existing Sphinx highlighting:

<html>
  <body>Hello World</body>
</html>
def hello():
    """Greet."""
    return "Hello World"
/**
 * Greet.
 */
function hello(): {
  return "Hello World";
}

Admonitions

See Also

See also

This is a seealso.

See also

This is a longer seealso. It might also contain links to our code such as a link to convert_notebooks and it may also simply contain a normal hyperlink to http://www.google.com.

Note

Note

This is a note.

Note

This is a longer note. It might also contain links to our code such as a link to convert_notebooks and it may also simply contain a normal hyperlink to http://www.google.com.

Warning

Warning

This is a warning.

Warning

This is a longer warning. It might also contain links to our code such as a link to convert_notebooks and it may also simply contain a normal hyperlink to http://www.google.com.

Danger

Danger

This is danger-ous.

Danger

This is a longer danger. It might also contain links to our code such as a link to convert_notebooks and it may also simply contain a normal hyperlink to http://www.google.com.

Footnotes

I have footnoted a first item 1 and second item 2.

Footnotes

1

My first footnote.

2

My second footnote.

Tables

Here are some examples of Sphinx tables.

Grid

Header1

Header2

Header3

Header4

row1, cell1

cell2

cell3

cell4

row2 …

Simple

H1

H2

H3

cell1

cell2

cell3

Code Documentation

An example Python function.

format_exception(etype, value, tb[, limit=None])

Format the exception with a traceback.

Parameters
  • etype – exception type

  • value – exception value

  • tb – traceback object

  • limit (integer or None) – maximum number of stack frames to show

Return type

list of strings

An example JavaScript function.

class MyAnimal(name[, age])
Arguments
  • name (string()) – The name of the animal

  • age (number()) – an optional age for the animal

IPython Notebook

This is what Notebook integration looks like:

import pandas as pd
import numpy as np
import ffn
#%pylab inline
print 'this is a printed line'
this is a printed line
data = ffn.get('aapl,msft,yhoo', start='2010-01-01')
print data.head()
             aapl   msft   yhoo
Date
2010-01-04  29.22  27.48  17.10
2010-01-05  29.27  27.49  17.23
2010-01-06  28.81  27.32  17.17
2010-01-07  28.75  27.03  16.70
2010-01-08  28.94  27.22  16.70

[5 rows x 3 columns]
data.head()
aapl msft yhoo
Date
2010-01-04 29.22 27.48 17.10
2010-01-05 29.27 27.49 17.23
2010-01-06 28.81 27.32 17.17
2010-01-07 28.75 27.03 16.70
2010-01-08 28.94 27.22 16.70

5 rows × 3 columns

data.plot()
<matplotlib.axes.AxesSubplot at 0x7fbae88b19d0>
../../../../_images/nb-examples_4_1.png
# this is a comment
data.to_returns().dropna().corr().as_format('.2f')
aapl msft yhoo
aapl 1.00 0.35 0.28
msft 0.35 1.00 0.37
yhoo 0.28 0.37 1.00

3 rows × 3 columns