Contents
Git
Select the cell you want to convert, and then: Select Cell from the top navigation Cell Type Markdown. There's also a shortcut – Select the cell, press ESC (escape key) and enter the command mode, then press M. This way the cell will get converted from Code to Markdown. After converting the cell to Markdown, refer the guide below. Jupyter Notebook Markdown Cheatsheet April 9, 2020 SqlBak mike Jupyter Notebook is a great tool for data analysis. And one of its greatest features is that you.
Command | Description |
---|---|
git init | Initialize git in the working directory |
git add . | Add all modified files to the staging area |
git clone <GIT_REPO> <DIR> | Clone the master branch from a GitHub repository |
git clone -b <BRANCH_NAME> <GIT_REPO> <DIR> | Clone a specified branch from a GitHub repository |
git checkout . | Discard all changes in your working copy |
git status | Check files that are changed, and need to be committed |
git remote set-url origin <URL_NAME> | Add a remote directory to origin so you can push your local repository to it |
git remote -v | List all remote repositories |
git push origin master | Push your local repository to the origin url into the master branch |
git diff | Show changes between your working copy and the tree |
git pull | Fetch and merge changes from remote repository to your working repository |
git submodule add <GIT_REPO> <DIR> | Add submodule GitHub repositories to one of the subfolders of your working repository |
git submodule recursive | Recursively update all submodules in your working repository |
git config --global credential.helper cache | Git to start caching credentials |
git config --global credential.helper 'cache --timeout=7200' | Git to cache credentials for 2 hours |
Jupyter Labextension
Command | Description |
---|---|
jupyter labextension list | List all labextensions |
jupyter labextension upgrade | Update all labextensions |
jupyter labextension install <EXTENSION_NAME> | Install an extension and build |
jupyter labextension uninstall <EXTENSION_NAME> | Uninstall an extension and build |
jupyter labextension install <EXTENSION_NAME> --no-build | Install an extension but do not build |
jupyter lab build | Build jupyter |
Conda
Command | Description |
---|---|
source activate <ENV_NAME> | Activate an environment (Linux) |
conda activate <ENV_NAME> | Activate an environment (Windows) |
conda list | Show all packages in current environment |
conda install <PKG1> <PKG2> <PKG3> | Install latest versions of Python packages <PKG1> <PKG2> <PKG3> |
conda install <PKG1>=<VER> | Install version <VER> of Python package <PKG1> |
conda list --explicit > 'my_env_packages.txt' | Write all packages in current environment into the txt file |
conda create --name <ENV_NAME> --file 'my_eng_packages.txt' | Create a new environment and install all files in the txt file |
conda env export > 'my_eng_packages.yml' | Export current environment and package informaion into a yml file |
conda create -f 'my_env_packages.yml' | Create a new environment based on a yml file |
conda config --get | Get summary of conda channel configuration |
conda config --prepend channels <CHANNEL_NAME> | Add channel with highest priority |
conda config --append channels <CHANNEL_NAME> | Add channel with lowest priority |
conda config --set channel_priority false | Install the newest version of a package in any listed channel |
conda remove -n <ENV_NAME> --all | Remove environment |
Nikola
Command | Description |
---|---|
nikola build | Build nikola website |
nikola serve -b | Display localhost:8000 version of website |
nikola auto | Automatically scan changes to your edits of the website to build and serve on localhost:8000 |
nikola github_deploy | Publish website on GitHub Pages. Commits and pushed both the src and master branches of the GitHub Page. |
nikola plugin -i <PLUGIN_NAME> | Install nikola plugins |
nikola plugin -r <PLUGIN_NAME> | Uninstall nikola plugins |
nikola subtheme <THEME_NAME> | Select a subtheme from bootswatch (i.e., lumen) |
Markdown
Command | Description |
---|---|
[File Title](file.md) | Links to file.md in current directory |
[File Title](subfolder/file.md) | Links to file.md in subfolder of current directory |
[File Title](../folder/file.md) | Links to file.md from your repository folder (i.e., blog2) |
 | Shows picture of pic.jpg stored in current directory |
<!-- TEASER_END --> | Teaser end for non .md and .html files |
Kaggle API
Command | Description |
---|---|
kaggle competitions list | List all competitions |
kaggle competitions list --category <CATEGORY> | List featured competitions |
kaggle competitions download <COMPETITION> | Download all files associated to competition |
reStructuredText
Command | Description |
---|---|
| Title of page |
| Slug of the page used as the last component of the page URL |
| Date of the page |
| Category of the page (only one) |
| Comma-separated list of page tags (multiple tags) |
| Description of page used for SEO |
| Author of page |
| Activate MathJax/KaTeX (true/false) |
| Used to indicate status of the page (published/private/draft/featured) |
| Show/hide title (true/false) |
| Activate hyphenation (true/false) |
| Teaser end used for blog post previews |
| Image preview that is used when sharing on social feeds |
| Template to render the package |
| Date that post was updated |
| ReST directive to create a floating alert box to the right |
| ReST directive to create contents page |
| ReST directive for a code-block in Python (shell for Linux, html for html, rst for reStructured, md for Markdown). Code-block must be indented. |
| Include line numbers for code-blocks. Command must be indented |
Directives |
tmux
Command | Description |
---|---|
| List windows |
| Create window |
| Delete window |
| Previous window |
| Next window |
| Split pane vertically |
| Split pane horizontally |
| Move to the pane in the direction of the <ARROW KEY> |
| Resize of pane according to the <ARROW KEY> |
Markdown is a simple text-to-HTML markup language written in plain text. Jupyter notebook recognizes markdown and renders markdown code as HTML. In this section, we present the basic features of markdown.
Python Cheat Sheet Pdf Github
See Markdown (by John Gruber) and GitHub Markdown Help for more information.
Text
Output | Syntax |
---|---|
emphasis | *emphasis* |
strong | **strong** |
code | `code` |
Headings
Output | Syntax |
---|---|
# Heading 1 | |
Heading 2 | ## Heading 2 |
Heading 3 | ### Heading 3 |
Heading 4 | #### Heading 4 |
Heading 5 | ##### Heading 5 |
Heading 6 | ###### Heading 6 |
Lists
Create an ordered list using numbers:
- Number theory
- Algebra
- Partial differential equations
- Probability
Create an unordered list using an asterisk * for each item:
- Number theory
- Algebra
- Partial differential equations
- Probability
Use indentation to create nested lists:
- Mathematics
- Calculus
- Linear Algebra
- Probability
- Physics
- Classical Mechanics
- Relativity
- Thermodynamics
- Biology
- Diffusion and Osmosis
- Homeostasis
- Immunology
Markdown Cheatsheet Github
Links

Create a link with the syntax [description](url)
. For example:
creates the link UBC Math.
Images
Include an image using the syntax 
. For example:
displays the image
Tables
Create a table by separating entries by pipe characters |:
Python Markdown Cheat Sheet
Python Operator | Description |
---|---|
+ | addition |
- | subtraction |
* | multiplication |
/ | division |
** | power |
The syntax :---:
specifies the alignment (centered in this case) of the columns. See more about GitHub flavoured markdown.
Exercises
Markdown Cheatsheet
- Create a numbered list of the top 5 websites you visit most often and include a link for each site.
- Write a short biography of your favourite mathematician, provide a link to their Wikipedia page and include an image (with a link and description of the source).
- Create a table of all the courses that you have taken in university. Include the columns: course number, course title, year (that you took the class), and instructor name.
