These notebooks contain training materials for scientific programmers of all levels.
They require Python 3.6, Anaconda, and (optional) git for use beyond web viewing.
To download a Github repository:
-
Open terminal
-
Navigate to your desired location for download and type
git clone https://github.com/ecpease/GettingStarted.git
OR
-
Click the green box on the top right of the home screen of the repository and click Download
To download a Python package:
- Google search for the package you want
- typically
conda install package
orpip install package
(check specific instructions)
To open a new Jupyter Notebook:
- Open terminal
- Activate your conda environment with
conda activate environment
oractivate environment
if using Windows - Navigate to your desired location from which to view/create notebooks (see below if you haven't done this before)
- type
jupyter notebook
and after a few seconds you'll see a notebook open in your web browser
Jupyter notebook shortcuts:
SHIFT+ENTER
to run a code block- Click to the left and
a
to create a code block above the current block - Click to the left and
b
to create a code block below the current block - Click to the left and
m
to change the code block to a markdown block
Basic terminal commands to work with files and navigate:
ls
- list directory (dir
for Windows)cd [folder name]
- change directorycd ..
- go back a foldercd
- return to home directoryrm [file]
- delete filerm -r [dir]
- delete directorymv file1 file2
- rename a filecp file1 file2
- copy file1 to file2
To run a Python script in the terminal:
python scriptname.py
To stop running a Python script in the terminal:
- CTRL + C