<commit_before>## Using Sphinx
  * In cmd or terminal > `sphinx-quickstart`
  * master document is the home page
  * `make html` OR `./make html` (in atom powershell) command to create html document, note to cd to folder where rst file is stored
  * Html pages stored under `_build/html` folder

## Themes
  * Built in themes: `alabaster` (default), `classic`, `sphinxdoc`, `scrolls`, `agogo`, `traditional`, `nature`, `haiku`, `pyramid`, `bizstyle`
  * Nicest theme is provided by readthedocs.org. View here on how to install https://pypi.python.org/pypi/sphinx_rtd_theme
  * `pip install sphinx_rtd_theme`
  * Add config.py with

``` 
import sphinx_rtd_theme
html_theme = "sphinx_rtd_theme"
html_theme_path = [sphinx_rtd_theme.get_html_theme_path()]
```

## Headings
  * header 1 ====
  * header 2 -------
  * header 3 \*\*\*\*\*\*\*
  
## Auto Docstrings
  * A docstring is a string literal that occurs as the first statement in a module, function, class, or method definition
  * Ensure the docstrings are formatted correctly
  * Set `y` to set autodoc at `sphinx-quickstart` stage
  * At conf.py uncomment the following
  
```
import os
import sys
sys.path.insert(0, os.path.abspath('.'))
```

  * Change abspath if python code is in different directory
  * In rst file, set python file name without extension

```
.. automodule:: filename
    :members:
```

## Sidebar
```
.. sidebar:: title
 
    *Paragraph 1*. Statement 1.
 
    *Paragraph 2*. Statement 2.
```

## Table of Contents
  * Define max depth to display based on headers === & ----
  * Add in additional pages (.rst files) using the file name
  * Add auto-numbering if necessary
  
```
.. toctree::
   :maxdepth: 1
   :caption: Contents
   :numbered:
  
   page 1
   page 2
```

## Tables
  * Use the table generator in the link: http://www.tablesgenerator.com/text_tables

## Other Commands
  * __Code__: enclosed in backticks ` `
  * __Bold__: enclosed in double asterieks ** **
  * __Italics__: enclosed in asterieks * *
  * __Line Break__: pipe |
  * __Undo Commands__: \
  * __Hyperlink__: enclosed in backticks \`PyPI <https://pypi.python.org/pypi/Sphinx>\`
  * __Images__: `.. image:: workflow.png`

## Resources
  * __Sphinx Documentation__: http://www.sphinx-doc.org/en/stable/index.html
  * __Cheatsheet Matplotlib__: http://matplotlib.org/sampledoc/cheatsheet.html
  * __Cheatsheet Ralsina__: https://github.com/ralsina/rst-cheatsheet/blob/master/rst-cheatsheet.rst
  * __Themes__: http://www.writethedocs.org/guide/tools/sphinx-themes/
  * __Docstrings__: https://www.python.org/dev/peps/pep-0257/
  * __Autodoc__: https://codeandchaos.wordpress.com/2012/07/30/sphinx-autodoc-tutorial-for-dummies/<commit_msg>edited sphinx.md<commit_after>## Using Sphinx
  * In cmd or terminal > `sphinx-quickstart`
  * master document is the home page
  * `make html` OR `./make html` (in atom powershell) command to create html document, note to cd to folder where rst file is stored
  * Html pages stored under `_build/html` folder

## Themes
  * Built in themes: `alabaster` (default), `classic`, `sphinxdoc`, `scrolls`, `agogo`, `traditional`, `nature`, `haiku`, `pyramid`, `bizstyle`
  * Nicest theme is provided by readthedocs.org. View here on how to install https://pypi.python.org/pypi/sphinx_rtd_theme
  * `pip install sphinx_rtd_theme`
  * Add config.py with

``` 
import sphinx_rtd_theme
html_theme = "sphinx_rtd_theme"
html_theme_path = [sphinx_rtd_theme.get_html_theme_path()]
```

## Headings
  * header 1 ====
  * header 2 -------
  * header 3 \*\*\*\*\*\*\*
  
## Auto Docstrings
  * A docstring is a string literal that occurs as the first statement in a module, function, class, or method definition
  * Ensure the docstrings are formatted correctly
  * Set `y` to set autodoc at `sphinx-quickstart` stage
  * At conf.py uncomment the following
  
```
import os
import sys
sys.path.insert(0, os.path.abspath('.'))
```

  * Change abspath if python code is in different directory
  * In rst file, set python file name without extension

```
.. automodule:: filename
    :members:
```

## Sidebar
```
.. sidebar:: title
 
    *Paragraph 1*. Statement 1.
 
    *Paragraph 2*. Statement 2.
```

## Table of Contents
  * Define max depth to display based on headers === & ----
  * Add in additional pages (.rst files) using the file name
  * Add auto-numbering if necessary
  
```
.. toctree::
   :maxdepth: 1
   :caption: Contents
   :numbered:
  
   page 1
   page 2
```

## Tables
  * Use the table generator in the link: http://www.tablesgenerator.com/text_tables

## Other Commands
  * __Code__: enclosed in backticks ` `
  * __Bold__: enclosed in double asterieks ** **
  * __Italics__: enclosed in asterieks * *
  * __Line Break__: pipe |
  * __Undo Commands__: \
  * __Images__: `.. image:: workflow.png`
  * __Hyperlink__: assign a variable then call hyperlink below:
  ```
  Document dated Jun 2000. Download_.

  .. _Download: https://tools.ietf.org/html/rfc2865
  ```
  

## Resources
  * __Sphinx Documentation__: http://www.sphinx-doc.org/en/stable/index.html
  * __Cheatsheet Matplotlib__: http://matplotlib.org/sampledoc/cheatsheet.html
  * __Cheatsheet Ralsina__: https://github.com/ralsina/rst-cheatsheet/blob/master/rst-cheatsheet.rst
  * __Themes__: http://www.writethedocs.org/guide/tools/sphinx-themes/
  * __Docstrings__: https://www.python.org/dev/peps/pep-0257/
  * __Autodoc__: https://codeandchaos.wordpress.com/2012/07/30/sphinx-autodoc-tutorial-for-dummies/
{'fraction_non_alphanumeric': 0.13078470824949698, 'fraction_numerical': 0.009877446497164807, 'mean_word_length': 3.622147083685545, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 6, 'https://': 10, 'lorem ipsum': 0, 'www.': 8, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '698350', 'n_tokens_mistral': 2005, 'n_tokens_neox': 1856, 'n_words': 525}