From 68518190c44cfee79fb09b0513b21983808e6443 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Fri, 15 Aug 2025 00:40:31 +0000 Subject: [PATCH 1/4] Initial plan From 36e7e779ff2261204b6464c5d8adca48d4c616dc Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Fri, 15 Aug 2025 00:54:26 +0000 Subject: [PATCH 2/4] Fix 3 broken links in documentation Co-authored-by: mmcky <8263752+mmcky@users.noreply.github.com> --- lectures/about_py.md | 1 - lectures/pandas.md | 2 +- lectures/writing_good_code.md | 2 -- 3 files changed, 1 insertion(+), 4 deletions(-) diff --git a/lectures/about_py.md b/lectures/about_py.md index 4f9c883c..a331d34a 100644 --- a/lectures/about_py.md +++ b/lectures/about_py.md @@ -117,7 +117,6 @@ It is used and supported extensively by large tech firms including * [Google](https://www.google.com/) * [OpenAI](https://openai.com/) -* [Netflix](https://www.netflix.com/) * [Meta](https://opensource.fb.com/) * [Amazon](https://www.amazon.com/) * [Reddit](https://www.reddit.com/) diff --git a/lectures/pandas.md b/lectures/pandas.md index b43396c0..875d9c52 100644 --- a/lectures/pandas.md +++ b/lectures/pandas.md @@ -606,7 +606,7 @@ time from the World Bank. The World Bank [collects and organizes data](https://data.worldbank.org/indicator) on a huge range of indicators. -For example, [here's](https://data.worldbank.org/indicator/GC.DOD.TOTL.GD.ZS/countries) some data on government debt as a ratio to GDP. +For example, [here's](https://data.worldbank.org/indicator/GC.DOD.TOTL.GD.ZS) some data on government debt as a ratio to GDP. The next code example fetches the data for you and plots time series for the US and Australia diff --git a/lectures/writing_good_code.md b/lectures/writing_good_code.md index 153eb741..03e8e3fd 100644 --- a/lectures/writing_good_code.md +++ b/lectures/writing_good_code.md @@ -189,8 +189,6 @@ But as a programmer, your aim should be to **automate** repetition, **not** do i More importantly, repeating the same logic in different places means that eventually one of them will likely be wrong. -If you want to know more, read the excellent summary found on [this page](https://code.tutsplus.com/tutorials/3-key-software-principles-you-must-understand--net-25161). - We'll talk about how to avoid repetition below. ### Minimize Global Variables From 24f92cc7c95fea7428611fe3f8058cb722586113 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Fri, 15 Aug 2025 00:58:15 +0000 Subject: [PATCH 3/4] Fix common redirects for improved performance Co-authored-by: mmcky <8263752+mmcky@users.noreply.github.com> --- lectures/functions.md | 2 +- lectures/numpy.md | 6 +++--- lectures/python_essentials.md | 2 +- lectures/writing_good_code.md | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/lectures/functions.md b/lectures/functions.md index 993d0765..65b3b2fc 100644 --- a/lectures/functions.md +++ b/lectures/functions.md @@ -74,7 +74,7 @@ str(22) type(22) ``` -The full list of Python built-ins is [here](https://docs.python.org/library/functions.html). +The full list of Python built-ins is [here](https://docs.python.org/3/library/functions.html). ### Third Party Functions diff --git a/lectures/numpy.md b/lectures/numpy.md index 564db8a9..3efbf9fe 100644 --- a/lectures/numpy.md +++ b/lectures/numpy.md @@ -1480,9 +1480,9 @@ But this is inefficient relative to computing `Q` once-off. A better option is to use descriptors. A solution from the [quantecon -library](https://github.com/QuantEcon/QuantEcon.py/tree/master/quantecon) +library](https://github.com/QuantEcon/QuantEcon.py/tree/main/quantecon) using descriptors that behaves as we desire can be found -[here](https://github.com/QuantEcon/QuantEcon.py/blob/master/quantecon/discrete_rv.py). +[here](https://github.com/QuantEcon/QuantEcon.py/blob/main/quantecon/discrete_rv.py). ```{solution-end} ``` @@ -1505,7 +1505,7 @@ Your task is to An example solution is given below. -In essence, we've just taken [this code](https://github.com/QuantEcon/QuantEcon.py/blob/master/quantecon/ecdf.py) +In essence, we've just taken [this code](https://github.com/QuantEcon/QuantEcon.py/blob/main/quantecon/ecdf.py) from QuantEcon and added in a plot method ```{code-cell} python3 diff --git a/lectures/python_essentials.md b/lectures/python_essentials.md index e3c9dc21..e9b252e3 100644 --- a/lectures/python_essentials.md +++ b/lectures/python_essentials.md @@ -701,7 +701,7 @@ In programming, as in mathematics, the opposite is true reversed would be very hard to read, even if the author told you so on the first page. -In Python, the standard style is set out in [PEP8](https://www.python.org/dev/peps/pep-0008/). +In Python, the standard style is set out in [PEP8](https://peps.python.org/pep-0008/). (Occasionally we'll deviate from PEP8 in these lectures to better match mathematical notation) diff --git a/lectures/writing_good_code.md b/lectures/writing_good_code.md index 03e8e3fd..e61e7a4d 100644 --- a/lectures/writing_good_code.md +++ b/lectures/writing_good_code.md @@ -133,7 +133,7 @@ axes[2].legend(loc='upper left', frameon=True) plt.show() ``` -True, the code more or less follows [PEP8](https://www.python.org/dev/peps/pep-0008/). +True, the code more or less follows [PEP8](https://peps.python.org/pep-0008/). At the same time, it's very poorly structured. From 4854dfa1e8477dd521695ddbf52012cb5dc4ef31 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Fri, 15 Aug 2025 01:22:19 +0000 Subject: [PATCH 4/4] Restore valid Netflix and TutsPlus links that were incorrectly removed Co-authored-by: mmcky <8263752+mmcky@users.noreply.github.com> --- lectures/about_py.md | 1 + lectures/writing_good_code.md | 2 ++ 2 files changed, 3 insertions(+) diff --git a/lectures/about_py.md b/lectures/about_py.md index a331d34a..4f9c883c 100644 --- a/lectures/about_py.md +++ b/lectures/about_py.md @@ -117,6 +117,7 @@ It is used and supported extensively by large tech firms including * [Google](https://www.google.com/) * [OpenAI](https://openai.com/) +* [Netflix](https://www.netflix.com/) * [Meta](https://opensource.fb.com/) * [Amazon](https://www.amazon.com/) * [Reddit](https://www.reddit.com/) diff --git a/lectures/writing_good_code.md b/lectures/writing_good_code.md index e61e7a4d..081f2966 100644 --- a/lectures/writing_good_code.md +++ b/lectures/writing_good_code.md @@ -189,6 +189,8 @@ But as a programmer, your aim should be to **automate** repetition, **not** do i More importantly, repeating the same logic in different places means that eventually one of them will likely be wrong. +If you want to know more, read the excellent summary found on [this page](https://code.tutsplus.com/tutorials/3-key-software-principles-you-must-understand--net-25161). + We'll talk about how to avoid repetition below. ### Minimize Global Variables