Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 29 additions & 1 deletion Python/Module1_GettingStartedWithPython/SiteFormatting.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,36 @@ We can spend some time talking about `my_func` and then see it in action:
```

Lastly, the input and output of an iPython console and a Jupyter notebook alike is displayed as follows:
<!-- #endregion -->

```python
2 + 3
```

## Running Code Snippets from this Site

In PLYMI, we typically precede every code snippet with one or more commented lines.
This is useful because it makes a page more "skimmable", since the code snippets essentially come with
descriptive, self-explanatory captions.
That being said, there is a downside to this.

Python terminals don't like having multiple comment lines precede an input-prompt.
E.g. if you paste and run the following code into a terminal

```python
# demonstrating the distinction of
# input and output via >>>

>>> x = 1
```

you will get a syntax error.
To fix this issue, simply exclude the comments when you copy this block to your clipboard.
Running

```python
>>> x = 1
```

will work without any issue.
Keep this in mind if you ever find yourself having trouble running code that you copied from this site.
<!-- #endregion -->
7 changes: 6 additions & 1 deletion Python/index.rst
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
.. meta::
:description: Topic: Top page of Python Like You Mean It, Difficulty: Easy, Category: Introduction
:keywords: PLYMI, Python Like You Mean It, tutorial, python for machine learning, python for deep learning, python for data science, numpy, python from scratch, basic python tutorial, teaching python

=======================
Python Like You Mean It
=======================
Expand All @@ -13,6 +17,7 @@ What this is
Python Like You Mean It (PLYMI) is a free resource for learning the basics of Python & NumPy, and moreover, becoming a competent Python user. The features of the Python language that are emphasized here were chosen to help those who are particularly interested in STEM applications (data analysis, machine learning, numerical work, etc.).

I want this to be a lean, one-stop resource for learning the essentials of Python from scratch. The reader will begin by learning about what Python is and what installing Python even means, and will hopefully walk away with a solid understanding of a substantial core of the language and its premiere numerical library, NumPy. I am also placing an emphasis on best practices throughout this site and am teaching to the latest version of Python (version 3.9, as of writing this).
This material has proven to be fruitful for high school and college teachers alike to teach Python as part of their STEM curriculum.


What this isn't
Expand Down Expand Up @@ -58,7 +63,7 @@ The following people made significant contributions to PLYMI, adding problems wi

About Me
--------
I started learning to use Python in graduate school for my physics research, and I was *so* bad at using it. Fortunately, one of my labmates was more experienced and had the good sense to tell me that my code and work flow was terrible. He pointed me to tooling, style guides, and documentation pages so that I could improve (I'd like to think that this resource would have been a huge help to me back then). I've been coding in Python for at least six years now, and I've taken to following the language, along with its new features and changes, quite closely. Currently I do machine learning research, and have served as a core developer for a machine learning library. I also love to teach, so this has been a fun project for me to take on!
I started learning to use Python in graduate school for my physics research, and I was *so* bad at using it. Fortunately, one of my labmates was more experienced and had the good sense to tell me that my code and work flow was terrible. He pointed me to tooling, style guides, and documentation pages so that I could improve (I'd like to think that this resource would have been a huge help to me back then). I've been coding in Python for at least eight years now, and I've taken to following the language, along with its new features and changes, quite closely. Currently I do machine learning research, and have served as a core developer for a machine learning library. I also love to teach, so this has been a fun project for me to take on!


.. toctree::
Expand Down
7 changes: 6 additions & 1 deletion Python/intro.rst
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
.. meta::
:description: Topic: Top page of Python Like You Mean It, Difficulty: Easy, Category: Introduction
:keywords: PLYMI, Python Like You Mean It, tutorial, python for machine learning, python for deep learning, python for data science, numpy, python from scratch, basic python tutorial, teaching python

=======================
Python Like You Mean It
=======================
Expand All @@ -13,6 +17,7 @@ What this is
Python Like You Mean It (PLYMI) is a free resource for learning the basics of Python & NumPy, and moreover, becoming a competent Python user. The features of the Python language that are emphasized here were chosen to help those who are particularly interested in STEM applications (data analysis, machine learning, numerical work, etc.).

I want this to be a lean, one-stop resource for learning the essentials of Python from scratch. The reader will begin by learning about what Python is and what installing Python even means, and will hopefully walk away with a solid understanding of a substantial core of the language and its premiere numerical library, NumPy. I am also placing an emphasis on best practices throughout this site and am teaching to the latest version of Python (version 3.9, as of writing this).
This material has proven to be fruitful for high school and college teachers alike to teach Python as part of their STEM curriculum.


What this isn't
Expand Down Expand Up @@ -56,4 +61,4 @@ The following people made significant contributions to PLYMI, adding problems wi

About Me
--------
I started learning to use Python in graduate school for my physics research, and I was *so* bad at using it. Fortunately, one of my labmates was more experienced and had the good sense to tell me that my code and work flow was terrible. He pointed me to tooling, style guides, and documentation pages so that I could improve (I'd like to think that this resource would have been a huge help to me back then). I've been coding in Python for at least six years now, and I've taken to following the language, along with its new features and changes, quite closely. Currently I do machine learning research, and have served as a core developer for a machine learning library. I also love to teach, so this has been a fun project for me to take on!
I started learning to use Python in graduate school for my physics research, and I was *so* bad at using it. Fortunately, one of my labmates was more experienced and had the good sense to tell me that my code and work flow was terrible. He pointed me to tooling, style guides, and documentation pages so that I could improve (I'd like to think that this resource would have been a huge help to me back then). I've been coding in Python for at least eight years now, and I've taken to following the language, along with its new features and changes, quite closely. Currently I do machine learning research, and have served as a core developer for a machine learning library. I also love to teach, so this has been a fun project for me to take on!