You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: foundations/getting-started-python/conda.md
+8-2Lines changed: 8 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -10,13 +10,19 @@ Package management is useful because you may want to update a package for one of
10
10
11
11
## Installing Conda
12
12
13
-
We recommmend you install Miniconda. You can do that by following the [instructions for you machine](https://docs.conda.io/en/latest/miniconda.html).
13
+
We recommend you install Miniconda. You can do that by following the [instructions for you machine](https://docs.conda.io/en/latest/miniconda.html).
14
14
15
15
Miniconda is a paired down version of Anaconda. [Installing Anaconda](https://docs.anaconda.com/anaconda/install/) takes longer and takes up more disk space, but provides you with more functionality. Anaconda comes with a Jupyter and Spyder, a Python-specific integrated development platform (IDE), installations as well as other packages. The interface of Anaconda is great if you are uncomfortable with the terminal.
16
16
17
+
_Elaborate on Miniconda vs Anaconda... Miniconda is recommended because we should install packages in isolated environments..._
18
+
17
19
## Creating a Conda environment
18
20
19
-
A conda environment is a directory that contains a collection of packages or libraries that you would like installed and accessible for this workflow. To create a new Conda environment, type `conda create --name` and the name of your environment in your terminal, and then specify any packages that you would like to have installed. For example, to install a Jupyter-ready environment, type `conda create --name sample_environment python jupyterlab`.
21
+
A conda environment is a directory that contains a collection of packages or libraries that you would like installed and accessible for this workflow. To create a new Conda environment, type `conda create --name` and the name of your environment in your terminal, and then specify any packages that you would like to have installed. For example, to install a Jupyter-ready environment called `sample_environment`, type
It is a good idea to create new environments for different projects because since Python is open source, new versions of the tools you use may become available. This is a way of guaranteeing that your script will use the same versions of packages and libraries and should run the same as you expect it to.
Copy file name to clipboardExpand all lines: foundations/getting-started-python/how-to-run-python.md
+6-5Lines changed: 6 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,7 +2,7 @@
2
2
3
3
This section provides an overview of different ways to run Python code, and quickstart guides for
4
4
5
-
-Chosing a Python platform
5
+
-Choosing a Python platform
6
6
- Installing and running Python on various local platforms
7
7
- Running Python in the cloud
8
8
@@ -13,24 +13,25 @@ There is no single official platform for the Python language. Here we provide a
13
13
1. The terminal,
14
14
2. Jupyter notebooks, and
15
15
3. IDEs (integrated development environment).
16
-
We highly encourage the use of Jupyter notebooks; all of our tutorials will be in a Jupyter notebook format. Here we hope to provide you with enough information to understand the differences and similarities between each platform so that you can make the best chose for your work environment and learn along effectively, regardless of your Python platform preference.
17
16
18
-
In general, it is always best to test your programs in the same environment in which they will be run. The biggest factors to consider when chosing your platform are:
17
+
We highly encourage the use of Jupyter notebooks; all of our tutorials will be in a Jupyter notebook format. Here we hope to provide you with enough information to understand the differences and similarities between each platform so that you can make the best chose for your work environment and learn along effectively, regardless of your Python platform preference.
18
+
19
+
In general, it is always best to test your programs in the same environment in which they will be run. The biggest factors to consider when choosing your platform are:
19
20
20
21
- What are you already comfortable with?
21
22
- What are the people around you using (peers, coworkers, instructors, etc)?
22
23
23
24
### Terminal
24
25
25
-
For learners who are familiar with basic [Linix commands](https://cheatography.com/davechild/cheat-sheets/linux-command-line/).and text editors, learning Python in the terminal is the quickest route straight to learning Python syntax without the covering the bells and whistles of your new platform. If you are runing Python on a super computer, through an HTTP request, or ssh tunneling you might want to consider learning in the terminal.
26
+
For learners who are familiar with basic [Linux commands](https://cheatography.com/davechild/cheat-sheets/linux-command-line/).and text editors, learning Python in the terminal is the quickest route straight to learning Python syntax without the covering the bells and whistles of your new platform. If you are runing Python on a super computer, through an HTTP request, or ssh tunneling you might want to consider learning in the terminal.
26
27
27
28
### Jupyter Session
28
29
29
30
Jupyter Notebooks are very popular among data scientists. It is a free, open-source, interactive tool that allows you to run Python code in "cells." This means that your workflow can alternate between code, output, and even Markdown-formatted explanatory sections that create an easy to follow analysis from start to finish. Jupyter notebooks are a great option for presentations or learning tools. For these reasons the lessons in this book will be taught via Jupyter notebooks.
30
31
31
32
### Other IDEs
32
33
33
-
If you already code in other languages you might already have a favorite IDE that will work just as well in Python. Spyder is a Python specific IDE that comes with the Anaconda download. It is perhaps the most familiar IDE if you are coming from languages such as Matlab that have a language specific platform and display a list of variables. PyCharm and Visual Studio Code are also popular IDEs. Many IDEs offer support for terminal execution, scripts, and Jupyter display. To learn about your specific IDE visit its official documentation.
34
+
If you already code in other languages you might already have a favorite IDE that will work just as well in Python. [Spyder](https://www.spyder-ide.org) is a Python specific IDE that comes with the [Anaconda download](https://www.anaconda.com/products/individual). It is perhaps the most familiar IDE if you are coming from languages such as [Matlab](https://www.mathworks.com/products/matlab.html) that have a language specific platform and display a list of variables. [PyCharm](https://www.jetbrains.com/pycharm/) and [Visual Studio Code](https://code.visualstudio.com) are also popular IDEs. Many IDEs offer support for terminal execution, scripts, and Jupyter display. To learn about your specific IDE visit its official documentation.
Or you can install the full [Anaconda](https://www.anaconda.com/products/individual), and select Jupyter in the GUI. **have a screenshot of that here**
17
20
18
-
Test that you have installed everything correctly by activating your environment with `conda activate pythia_foundations` and running `jupyter lab`.
21
+
Test that you have installed everything correctly by first activating your environment:
22
+
23
+
```
24
+
conda activate pythia_foundations
25
+
jupyter lab
26
+
```
27
+
28
+
A new window should open automatically in your default browser. You can change the browser with (for example):
19
29
20
-
A new window should open automatically in your default browser. You can change the browser with `jupyter lab —browser=chrome`.
Copy file name to clipboardExpand all lines: foundations/getting-started-python/terminal.md
+4-1Lines changed: 4 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -10,7 +10,10 @@ You'd like to learn Python in the terminal. Here we will cover:
10
10
If running Python in the terminal it is best to install Miniconda. You can do that by following the [instructions for you machine](https://docs.conda.io/en/latest/miniconda.html).
11
11
12
12
Then create a Conda environment with Python installed by typing the following into your terminal:
13
-
`conda create --name pythia_foundations python`
13
+
14
+
```
15
+
conda create --name pythia_foundations python
16
+
```
14
17
15
18
You can test that this by running `python` in the command line.
Copy file name to clipboardExpand all lines: foundations/getting-started-python/why-python.md
+9-5Lines changed: 9 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,16 +2,20 @@
2
2
3
3
You're already here because you want to learn to use Python for your data analysis and visualizations. Python can be compared to other high-level, interpreted, object-oriented languages, but is especially great because it is free and open source!
4
4
5
-
**High level languages:**
5
+
## High level languages
6
+
6
7
Other high level languages include MatLab, IDL, and NCL. The advantage of high level languages is that the provide functions, data structures, and other utilities that are commonly used, which means it takes less code to get real work done. The disadvantage of high level languages is that they tend to obscure the low level aspects of the machine such as: memory use, how many floating point operations are happening, and other information related to performance. C and C++ are all examples of lower level languages. The "higher" the level of language, the more computing fundamentals are abstracted.
7
8
8
-
**Interpreted languages:**
9
-
Most of your work is probably already in interpreted languages if you've ever used IDL, NCL, or MatLab (interpreted languages are typically also high level). So you are already familiar with the advantages of this: you don't have to worry about compiling or machine compatability (it is portable). And you are probably familiar with their deficiencies: sometimes they can be slower than compiled languages and potentially more memory intensive.
9
+
## Interpreted languages
10
+
11
+
Most of your work is probably already in interpreted languages if you've ever used IDL, NCL, or MatLab (interpreted languages are typically also high level). So you are already familiar with the advantages of this: you don't have to worry about compiling or machine compatibility (it is portable). And you are probably familiar with their deficiencies: sometimes they can be slower than compiled languages and potentially more memory intensive.
12
+
13
+
## Object Oriented languages
10
14
11
-
**Object Oriented languages:**
12
15
Objects are custom datatypes. For every custom datatype, you usually have a set of operations you might want to conduct. For example, if you have an object that is a list of numbers you might want to apply a mathematical operation, such as sum, onto this list object in bulk. Not every function can be applied to every datatype; it wouldn't make sense to apply a logarithm to a string of letters or to capitalize a list of numbers. Data and the operations applied to them are grouped together into one object.
13
16
14
-
**Open source:**
17
+
## Open source
18
+
15
19
Python as a language is open source which means that there is a community of developers behind its codebase. Anyone can join the developer community and contribute to deciding the future of the language. When someone identifies gaps to Python's abilities, they can write up the code to fill these gaps. The open source nature of Python means that Python as a language is very adaptable to shifting needs of the user community.
16
20
17
21
Python is a language designed for rapid prototyping and efficient programming. It is easy to write new code quickly with less typing.
0 commit comments