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.gitOR
-
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 packageorpip install package(check specific instructions)
To open a new Jupyter Notebook:
- Open terminal
- Activate your conda environment with
conda activate environmentoractivate environmentif using Windows - Navigate to your desired location from which to view/create notebooks (see below if you haven't done this before)
- type
jupyter notebookand after a few seconds you'll see a notebook open in your web browser
Jupyter notebook shortcuts:
SHIFT+ENTERto run a code block- Click to the left and
ato create a code block above the current block - Click to the left and
bto create a code block below the current block - Click to the left and
mto change the code block to a markdown block
Basic terminal commands to work with files and navigate:
ls- list directory (dirfor 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