From b5421a05ab583a807225a5c01a617f269c611963 Mon Sep 17 00:00:00 2001 From: mmcky Date: Tue, 15 Sep 2020 13:21:41 +1000 Subject: [PATCH] rebuild with sphinxontrib-tomyst(84a11e7) --- source/rst/about_py.md | 4 ---- source/rst/debugging.md | 4 ---- source/rst/functions.md | 8 -------- source/rst/getting_started.md | 10 ++-------- source/rst/matplotlib.md | 4 ---- source/rst/numba.md | 4 ---- source/rst/numpy.md | 8 -------- source/rst/oop_intro.md | 6 ------ source/rst/pandas.md | 6 ------ source/rst/parallelization.md | 2 -- source/rst/python_advanced_features.md | 8 -------- source/rst/python_by_example.md | 10 ---------- source/rst/python_essentials.md | 18 +----------------- source/rst/python_oop.md | 4 ---- source/rst/scipy.md | 8 -------- source/rst/search.md | 2 -- source/rst/troubleshooting.md | 2 -- source/rst/writing_good_code.md | 2 -- 18 files changed, 3 insertions(+), 107 deletions(-) diff --git a/source/rst/about_py.md b/source/rst/about_py.md index c78f9306..4b92b74e 100644 --- a/source/rst/about_py.md +++ b/source/rst/about_py.md @@ -302,14 +302,10 @@ the last few years. #### Pandas -Duplicate implicit target name: "pandas". - ```{index} single: Pandas ``` -Duplicate explicit target name: "pandas". - One of the most popular libraries for working with data is [pandas](http://pandas.pydata.org/). Pandas is fast, efficient, flexible and well designed. diff --git a/source/rst/debugging.md b/source/rst/debugging.md index 8ae3b2bb..0f5f019d 100644 --- a/source/rst/debugging.md +++ b/source/rst/debugging.md @@ -8,8 +8,6 @@ # Debugging -Duplicate implicit target name: "debugging". - ```{index} single: Debugging ``` @@ -48,8 +46,6 @@ import matplotlib.pyplot as plt ## Debugging -Duplicate implicit target name: "debugging". - ```{index} single: Debugging ``` diff --git a/source/rst/functions.md b/source/rst/functions.md index a53ed8ee..324f94c1 100644 --- a/source/rst/functions.md +++ b/source/rst/functions.md @@ -8,8 +8,6 @@ # Functions -Duplicate implicit target name: "functions". - ```{index} single: Python; User-defined functions ``` @@ -339,8 +337,6 @@ Use no import besides `from numpy.random import uniform`. ### Exercise 1 -Duplicate implicit target name: "exercise 1". - Here's one solution. ```{code-block} python3 @@ -355,8 +351,6 @@ factorial(4) ### Exercise 2 -Duplicate implicit target name: "exercise 2". - ```{code-block} python3 from numpy.random import uniform @@ -373,8 +367,6 @@ binomial_rv(10, 0.5) ### Exercise 3 -Duplicate implicit target name: "exercise 3". - Here's a function for the first random device. ```{code-block} python3 diff --git a/source/rst/getting_started.md b/source/rst/getting_started.md index 57dea539..5daa99e5 100644 --- a/source/rst/getting_started.md +++ b/source/rst/getting_started.md @@ -335,8 +335,6 @@ Save it somewhere, navigate to it from the Jupyter dashboard and then run as dis ### QuantEcon Notes -Duplicate implicit target name: "quantecon notes". - QuantEcon has its own site for sharing Jupyter notebooks related to economics -- [QuantEcon Notes](http://notes.quantecon.org/). @@ -509,9 +507,7 @@ For example, if you've installed the command line version, open up a terminal an As the 2nd task, -1. Duplicate explicit target name: "github". - - Sign up to [GitHub](https://github.com/). +1. Sign up to [GitHub](https://github.com/). 1. Look into 'forking' GitHub repositories (forking means making your own copy of a GitHub repository, stored on GitHub). 1. Fork [QuantEcon.py](https://github.com/QuantEcon/QuantEcon.py). 1. Clone your fork to some local directory, make edits, commit them, and push them back up to your forked GitHub repo. @@ -520,9 +516,7 @@ As the 2nd task, For reading on these and other topics, try * [The official Git documentation](http://git-scm.com/doc). -* Duplicate explicit target name: "github". - - Reading through the docs on [GitHub](https://github.com/). +* Reading through the docs on [GitHub](https://github.com/). * [Pro Git Book](http://git-scm.com/book) by Scott Chacon and Ben Straub. * One of the thousands of Git tutorials on the Net. diff --git a/source/rst/matplotlib.md b/source/rst/matplotlib.md index ea8bc3eb..671fd0b6 100644 --- a/source/rst/matplotlib.md +++ b/source/rst/matplotlib.md @@ -8,8 +8,6 @@ # Matplotlib -Duplicate implicit target name: "matplotlib". - ```{index} single: Python; Matplotlib ``` @@ -294,8 +292,6 @@ The output should look like this ### Exercise 1 -Duplicate implicit target name: "exercise 1". - Here's one solution ```{code-block} ipython3 diff --git a/source/rst/numba.md b/source/rst/numba.md index 0e27275a..27c01e28 100644 --- a/source/rst/numba.md +++ b/source/rst/numba.md @@ -509,8 +509,6 @@ Hints: ### Exercise 1 -Duplicate implicit target name: "exercise 1". - Here is one solution: ```{code-block} python3 @@ -547,8 +545,6 @@ characters. ### Exercise 2 -Duplicate implicit target name: "exercise 2". - We let - 0 represent "low" diff --git a/source/rst/numpy.md b/source/rst/numpy.md index 2ff51ac7..68ac80d3 100644 --- a/source/rst/numpy.md +++ b/source/rst/numpy.md @@ -22,8 +22,6 @@ single: Python; NumPy ## Overview -Duplicate implicit target name: "numpy". - [NumPy](https://en.wikipedia.org/wiki/NumPy) is a first-rate library for numerical programming * Widely used in academia, finance and industry. @@ -789,8 +787,6 @@ import matplotlib.pyplot as plt ### Exercise 1 -Duplicate implicit target name: "exercise 1". - This code does the job ```{code-block} python3 @@ -815,8 +811,6 @@ print(q(x)) ### Exercise 2 -Duplicate implicit target name: "exercise 2". - Here's our first pass at a solution: ```{code-block} python3 @@ -876,8 +870,6 @@ using descriptors that behaves as we desire can be found ### Exercise 3 -Duplicate implicit target name: "exercise 3". - An example solution is given below. In essence, we've just taken [this diff --git a/source/rst/oop_intro.md b/source/rst/oop_intro.md index b2315ddb..79a53984 100644 --- a/source/rst/oop_intro.md +++ b/source/rst/oop_intro.md @@ -57,8 +57,6 @@ These concepts are defined and discussed sequentially below. ### Type -Duplicate implicit target name: "type". - ```{index} single: Python; Type ``` @@ -117,8 +115,6 @@ int('300') + 400 # To add as numbers, change the string to an integer ### Identity -Duplicate implicit target name: "identity". - ```{index} single: Python; Identity ``` @@ -179,8 +175,6 @@ These attributes are important, so let's discuss them in-depth. ### Methods -Duplicate implicit target name: "methods". - ```{index} single: Python; Methods ``` diff --git a/source/rst/pandas.md b/source/rst/pandas.md index d0ea0ed7..a1920069 100644 --- a/source/rst/pandas.md +++ b/source/rst/pandas.md @@ -24,8 +24,6 @@ In addition to what’s in Anaconda, this lecture will need the following librar ## Overview -Duplicate implicit target name: "pandas". - [Pandas](http://pandas.pydata.org/) is a package of fast, efficient data analysis tools for Python. Its popularity has surged in recent years, coincident with the rise @@ -483,8 +481,6 @@ Complete the program to show summary statistics and plot the result as a time se ### Exercise 1 -Duplicate implicit target name: "exercise 1". - There are a few ways to approach this problem using Pandas to calculate the percentage change. @@ -520,8 +516,6 @@ plt.show() ### Exercise 2 -Duplicate implicit target name: "exercise 2". - Following the work you did in Exercise 1, you can query the data using `read_data` by updating the start and end dates accordingly. ```{code-block} python3 diff --git a/source/rst/parallelization.md b/source/rst/parallelization.md index 8125a26c..2dcc7a23 100644 --- a/source/rst/parallelization.md +++ b/source/rst/parallelization.md @@ -429,8 +429,6 @@ For the size of the Monte Carlo simulation, use something substantial, such as ### Exercise 1 -Duplicate implicit target name: "exercise 1". - Here is one solution: ```{code-block} python3 diff --git a/source/rst/python_advanced_features.md b/source/rst/python_advanced_features.md index 37a75375..b4677772 100644 --- a/source/rst/python_advanced_features.md +++ b/source/rst/python_advanced_features.md @@ -1136,8 +1136,6 @@ In the opinion of many people, this makes the decorator syntax a significant imp ### Descriptors -Duplicate implicit target name: "descriptors". - ```{index} single: Python; Descriptors ``` @@ -1664,8 +1662,6 @@ Using `try` -- `except`, write a program to read in the contents of the file and ### Exercise 1 -Duplicate implicit target name: "exercise 1". - Here's the standard solution ```{code-block} python3 @@ -1686,8 +1682,6 @@ print([x(i) for i in range(10)]) ### Exercise 2 -Duplicate implicit target name: "exercise 2". - One solution is as follows ```{code-block} python3 @@ -1715,8 +1709,6 @@ for date in dates: ### Exercise 3 -Duplicate implicit target name: "exercise 3". - Let's save the data first ```{code-block} python3 diff --git a/source/rst/python_by_example.md b/source/rst/python_by_example.md index 96b79748..aae4c84a 100644 --- a/source/rst/python_by_example.md +++ b/source/rst/python_by_example.md @@ -536,8 +536,6 @@ Your hints are as follows: ### Exercise 1 -Duplicate implicit target name: "exercise 1". - Here's one solution. ```{code-block} python3 @@ -555,8 +553,6 @@ plt.show() ### Exercise 2 -Duplicate implicit target name: "exercise 2". - ```{code-block} python3 α_values = [0.0, 0.8, 0.98] T = 200 @@ -574,8 +570,6 @@ plt.show() ### Exercise 3 -Duplicate implicit target name: "exercise 3". - Here's one solution: ```{code-block} python3 @@ -593,8 +587,6 @@ plt.show() ### Exercise 4 -Duplicate implicit target name: "exercise 4". - Here's one way: ```{code-block} python3 @@ -632,8 +624,6 @@ plt.show() ### Exercise 5 -Duplicate implicit target name: "exercise 5". - Consider the circle of diameter 1 embedded in the unit square. Let $A$ be its area and let $r=1/2$ be its radius. diff --git a/source/rst/python_essentials.md b/source/rst/python_essentials.md index 50778933..42c957bd 100644 --- a/source/rst/python_essentials.md +++ b/source/rst/python_essentials.md @@ -432,8 +432,6 @@ single: Python; List comprehension We can also simplify the code for generating the list of random draws considerably by using something called a *list comprehension*. -Duplicate implicit target name: "list comprehensions". - [List comprehensions](https://en.wikipedia.org/wiki/List_comprehension) are an elegant Python tool for creating lists. Consider the following example, where the list comprehension is on the @@ -797,9 +795,7 @@ returns `True` if every element in `seq_a` is also an element of `seq_b`, else `False`. * By "sequence" we mean a list, a tuple or a string. -* Duplicate explicit target name: "sets". - - Do the exercise without using [sets](https://docs.python.org/3/tutorial/datastructures.html#sets) and set methods. +* Do the exercise without using [sets](https://docs.python.org/3/tutorial/datastructures.html#sets) and set methods. ### Exercise 5 @@ -838,8 +834,6 @@ for i in range(n): ### Exercise 1 -Duplicate implicit target name: "exercise 1". - #### Part 1 Solution: Here's one possible solution @@ -894,8 +888,6 @@ sum([x % 2 == 0 and y % 2 == 0 for x, y in pairs]) ### Exercise 2 -Duplicate implicit target name: "exercise 2". - ```{code-block} python3 def p(x, coeff): return sum(a * x**i for i, a in enumerate(coeff)) @@ -907,8 +899,6 @@ p(1, (2, 4)) ### Exercise 3 -Duplicate implicit target name: "exercise 3". - Here's one solution: ```{code-block} python3 @@ -933,8 +923,6 @@ count_uppercase_chars('The Rain in Spain') ### Exercise 4 -Duplicate implicit target name: "exercise 4". - Here's a solution: ```{code-block} python3 @@ -960,8 +948,6 @@ def f(seq_a, seq_b): ### Exercise 5 -Duplicate implicit target name: "exercise 5". - ```{code-block} python3 def linapprox(f, a, b, n, x): """ @@ -1001,8 +987,6 @@ def linapprox(f, a, b, n, x): ### Exercise 6 -Duplicate implicit target name: "exercise 6". - Here's one solution. ```{code-block} python3 diff --git a/source/rst/python_oop.md b/source/rst/python_oop.md index 4b23f5f4..37ea76af 100644 --- a/source/rst/python_oop.md +++ b/source/rst/python_oop.md @@ -804,8 +804,6 @@ Avoid using any `import` statements. ### Exercise 1 -Duplicate implicit target name: "exercise 1". - ```{code-block} python3 class ECDF: @@ -837,8 +835,6 @@ print(F(0.5)) ### Exercise 2 -Duplicate implicit target name: "exercise 2". - ```{code-block} python3 class Polynomial: diff --git a/source/rst/scipy.md b/source/rst/scipy.md index c7f8786a..b1324dc8 100644 --- a/source/rst/scipy.md +++ b/source/rst/scipy.md @@ -18,8 +18,6 @@ single: Python; SciPy ## Overview -Duplicate implicit target name: "scipy". - [SciPy](http://www.scipy.org) builds on top of NumPy to provide common tools for scientific programming such as * [linear algebra](http://docs.scipy.org/doc/scipy/reference/linalg.html) @@ -355,8 +353,6 @@ the fixed point of a function $f$ is the root of $g(x) := x - f(x)$. ## Optimization -Duplicate implicit target name: "optimization". - ```{index} single: SciPy; Optimization ``` @@ -425,8 +421,6 @@ See the [documentation](http://docs.scipy.org/doc/scipy/reference/integrate.html ## Linear Algebra -Duplicate implicit target name: "linear algebra". - ```{index} single: SciPy; Linear Algebra ``` @@ -453,8 +447,6 @@ Test it on the function `root_f`. ### Exercise 1 -Duplicate implicit target name: "exercise 1". - Here's a reasonable solution: ```{code-block} python3 diff --git a/source/rst/search.md b/source/rst/search.md index 7a41cc5f..028bf9cb 100644 --- a/source/rst/search.md +++ b/source/rst/search.md @@ -1,7 +1,5 @@ # Search -Duplicate implicit target name: "search". - ```{raw} html diff --git a/source/rst/troubleshooting.md b/source/rst/troubleshooting.md index 05a36f97..a8f612e2 100644 --- a/source/rst/troubleshooting.md +++ b/source/rst/troubleshooting.md @@ -8,8 +8,6 @@ # Troubleshooting -Duplicate implicit target name: "troubleshooting". - ```{contents} Contents :depth: 2 ``` diff --git a/source/rst/writing_good_code.md b/source/rst/writing_good_code.md index ee286156..8b12f420 100644 --- a/source/rst/writing_good_code.md +++ b/source/rst/writing_good_code.md @@ -401,8 +401,6 @@ in this lecture. ### Exercise 1 -Duplicate implicit target name: "exercise 1". - Here's one solution, that uses a class: ```{code-block} ipython3