Skip to content

Commit

Permalink
link to cn subdomain; update html
Browse files Browse the repository at this point in the history
  • Loading branch information
rsokl committed Oct 5, 2019
1 parent bbf230a commit d40da42
Show file tree
Hide file tree
Showing 41 changed files with 101 additions and 280 deletions.
2 changes: 1 addition & 1 deletion Python/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Python Like You Mean It

Edited by `David Mascharka <https://davidmascharka.com/>`_

`中文版 <https://alexding123.github.io/Learning_Python/>`_ (Chinese Version)
`中文版 <http://cn.pythonlikeyoumeanit.com//>`_ (Chinese Version)

What this is
------------
Expand Down
2 changes: 1 addition & 1 deletion Python/intro.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Python Like You Mean It

Edited by `David Mascharka <https://davidmascharka.com/>`_

`中文版 <https://alexding123.github.io/Learning_Python/>`_ (Chinese Version)
`中文版 <http://cn.pythonlikeyoumeanit.com/>`_ (Chinese Version)

What this is
------------
Expand Down
Binary file not shown.
Binary file modified docs/.doctrees/environment.pickle
Binary file not shown.
Binary file modified docs/.doctrees/index.doctree
Binary file not shown.
Binary file modified docs/.doctrees/intro.doctree
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -453,7 +453,7 @@ <h2>Notebook Cells<a class="headerlink" href="#Notebook-Cells" title="Permalink
<h2>An Example Notebook<a class="headerlink" href="#An-Example-Notebook" title="Permalink to this headline"></a></h2>
<p>To show off a more exciting use-case, let’s create a notebook that plots some data for us. We’ll use matplotlib, a Python library that is used for plotting data, and NumPy, the premiere library for doing numerical work in Python. We will import these libraries for use in our code. Next we’ll define some mathematical functions. And finally, we’ll plot these functions evaluated on a large number of closely-spaced points on the domain.</p>
<div class="nbinput nblast docutils container">
<div class="prompt highlight-none notranslate"><div class="highlight"><pre><span></span>[ ]:
<div class="prompt highlight-none notranslate"><div class="highlight"><pre><span></span>[1]:
</pre></div>
</div>
<div class="input_area highlight-none notranslate"><div class="highlight"><pre>
Expand Down
2 changes: 1 addition & 1 deletion docs/_sources/index.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Python Like You Mean It

Edited by `David Mascharka <https://davidmascharka.com/>`_

`中文版 <https://alexding123.github.io/Learning_Python/>`_ (Chinese Version)
`中文版 <http://cn.pythonlikeyoumeanit.com//>`_ (Chinese Version)

What this is
------------
Expand Down
2 changes: 1 addition & 1 deletion docs/_sources/intro.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Python Like You Mean It

Edited by `David Mascharka <https://davidmascharka.com/>`_

`中文版 <https://alexding123.github.io/Learning_Python/>`_ (Chinese Version)
`中文版 <http://cn.pythonlikeyoumeanit.com/>`_ (Chinese Version)

What this is
------------
Expand Down
2 changes: 1 addition & 1 deletion docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ <h1>Python Like You Mean It<a class="headerlink" href="#python-like-you-mean-it"
<blockquote>
<div><p>Written by <a class="reference external" href="https://scholar.google.com/citations?hl=en&amp;user=coXsftgAAAAJ&amp;view_op=list_works&amp;gmla=AJsN-F7Eg769ERNBQDKZ5-5xmT9qh2G2chKgH0Lwbd3zujR7FAPiWmVp_57dFPKG_h7ghPeLG8oGysj5YWziwXib4oHb6kr2HA">Ryan Soklaski</a> (Twitter/GitHub:<a class="reference external" href="https://twitter.com/rsokl">&#64;rsokl</a>)</p>
<p>Edited by <a class="reference external" href="https://davidmascharka.com/">David Mascharka</a></p>
<p><a class="reference external" href="https://alexding123.github.io/Learning_Python/">中文版</a> (Chinese Version)</p>
<p><a class="reference external" href="http://cn.pythonlikeyoumeanit.com//">中文版</a> (Chinese Version)</p>
</div></blockquote>
<div class="section" id="what-this-is">
<h2>What this is<a class="headerlink" href="#what-this-is" title="Permalink to this headline"></a></h2>
Expand Down
2 changes: 1 addition & 1 deletion docs/intro.html
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ <h1>Python Like You Mean It<a class="headerlink" href="#python-like-you-mean-it"
<blockquote>
<div><p>Written by <a class="reference external" href="https://scholar.google.com/citations?hl=en&amp;user=coXsftgAAAAJ&amp;view_op=list_works&amp;gmla=AJsN-F7Eg769ERNBQDKZ5-5xmT9qh2G2chKgH0Lwbd3zujR7FAPiWmVp_57dFPKG_h7ghPeLG8oGysj5YWziwXib4oHb6kr2HA">Ryan Soklaski</a> (Twitter/GitHub:<a class="reference external" href="https://twitter.com/rsokl">&#64;rsokl</a>)</p>
<p>Edited by <a class="reference external" href="https://davidmascharka.com/">David Mascharka</a></p>
<p><a class="reference external" href="https://alexding123.github.io/Learning_Python/">中文版</a> (Chinese Version)</p>
<p><a class="reference external" href="http://cn.pythonlikeyoumeanit.com/">中文版</a> (Chinese Version)</p>
</div></blockquote>
<div class="section" id="what-this-is">
<h2>What this is<a class="headerlink" href="#what-this-is" title="Permalink to this headline"></a></h2>
Expand Down
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified docs_backup/.doctrees/Module4_OOP/Applications_of_OOP.doctree
Binary file not shown.
Binary file not shown.
Binary file modified docs_backup/.doctrees/environment.pickle
Binary file not shown.
Binary file modified docs_backup/.doctrees/index.doctree
Binary file not shown.
Binary file modified docs_backup/.doctrees/intro.doctree
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -413,15 +413,24 @@ <h1>An Informal Introduction to Python<a class="headerlink" href="#An-Informal-I
<div class="section" id="Dabbling-with-Numbers">
<h2>Dabbling with Numbers<a class="headerlink" href="#Dabbling-with-Numbers" title="Permalink to this headline"></a></h2>
<p>Time to execute some Python code that performs simple arithmetic. Typing <code class="docutils literal notranslate"><span class="pre">2</span> <span class="pre">+</span> <span class="pre">3</span></code> into the IPython console and hitting the <code class="docutils literal notranslate"><span class="pre">&lt;ENTER&gt;</span></code> key, you should see the following input and output in the console:</p>
<div class="nbinput nblast docutils container">
<div class="prompt highlight-none notranslate"><div class="highlight"><pre><span></span>[ ]:
<div class="nbinput docutils container">
<div class="prompt highlight-none notranslate"><div class="highlight"><pre><span></span>[1]:
</pre></div>
</div>
<div class="input_area highlight-none notranslate"><div class="highlight"><pre>
<span></span>2 + 3
</pre></div>
</div>
</div>
<div class="nboutput nblast docutils container">
<div class="prompt highlight-none notranslate"><div class="highlight"><pre><span></span>[1]:
</pre></div>
</div>
<div class="output_area highlight-none notranslate"><div class="highlight"><pre>
<span></span>5
</pre></div>
</div>
</div>
<p>This console session is persistent, meaning that we can define a variable and then reference it in our code later on within this console session. Let’s define the variable <code class="docutils literal notranslate"><span class="pre">x</span></code> and assign it to the integer <code class="docutils literal notranslate"><span class="pre">10</span></code> (please follow along in the IPython console)</p>
<div class="nbinput nblast docutils container">
<div class="prompt highlight-none notranslate"><div class="highlight"><pre><span></span>[2]:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@
</style>
<div class="section" id="Installing-Python">
<h1>Installing Python<a class="headerlink" href="#Installing-Python" title="Permalink to this headline"></a></h1>
<p>Without further adieu, we now provide instructions for installing Python and other useful Python libraries on your machine via the Anaconda platform. Installing the Anaconda platform will install the following:</p>
<p>Without further ado, we now provide instructions for installing Python and other useful Python libraries on your machine via the Anaconda platform. Installing the Anaconda platform will install the following:</p>
<ul class="simple">
<li>Python; specifically the CPython interpreter that we discussed in the previous section.</li>
<li>A number of useful Python packages, like matplotlib, NumPy, and SciPy.</li>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -453,7 +453,7 @@ <h2>Notebook Cells<a class="headerlink" href="#Notebook-Cells" title="Permalink
<h2>An Example Notebook<a class="headerlink" href="#An-Example-Notebook" title="Permalink to this headline"></a></h2>
<p>To show off a more exciting use-case, let’s create a notebook that plots some data for us. We’ll use matplotlib, a Python library that is used for plotting data, and NumPy, the premiere library for doing numerical work in Python. We will import these libraries for use in our code. Next we’ll define some mathematical functions. And finally, we’ll plot these functions evaluated on a large number of closely-spaced points on the domain.</p>
<div class="nbinput nblast docutils container">
<div class="prompt highlight-none notranslate"><div class="highlight"><pre><span></span>[1]:
<div class="prompt highlight-none notranslate"><div class="highlight"><pre><span></span>[ ]:
</pre></div>
</div>
<div class="input_area highlight-none notranslate"><div class="highlight"><pre>
Expand Down
13 changes: 11 additions & 2 deletions docs_backup/Module1_GettingStartedWithPython/SiteFormatting.html
Original file line number Diff line number Diff line change
Expand Up @@ -435,15 +435,24 @@ <h1>A Quick Guide to Formatting<a class="headerlink" href="#A-Quick-Guide-to-For
</pre></div>
</div>
<p>Lastly, the input and output of an iPython console and a Jupyter notebook alike is displayed as follows:</p>
<div class="nbinput nblast docutils container">
<div class="prompt highlight-none notranslate"><div class="highlight"><pre><span></span>[ ]:
<div class="nbinput docutils container">
<div class="prompt highlight-none notranslate"><div class="highlight"><pre><span></span>[1]:
</pre></div>
</div>
<div class="input_area highlight-none notranslate"><div class="highlight"><pre>
<span></span>2 + 3
</pre></div>
</div>
</div>
<div class="nboutput nblast docutils container">
<div class="prompt highlight-none notranslate"><div class="highlight"><pre><span></span>[1]:
</pre></div>
</div>
<div class="output_area highlight-none notranslate"><div class="highlight"><pre>
<span></span>5
</pre></div>
</div>
</div>
</div>


Expand Down
10 changes: 5 additions & 5 deletions docs_backup/Module2_EssentialsOfPython/Basic_Objects.html
Original file line number Diff line number Diff line change
Expand Up @@ -274,8 +274,8 @@ <h2>Number Types<a class="headerlink" href="#Number-Types" title="Permalink to t
<p>Python has three basic types of numbers: integers, “floating-point” numbers, and complex numbers. Familiar mathematical symbols can be used to perform arithmetic on all of these numbers (comparison operators like “greater than” are not defined for complex numbers):</p>
<table border="1" class="docutils">
<colgroup>
<col width="19%" />
<col width="81%" />
<col width="13%" />
<col width="87%" />
</colgroup>
<thead valign="bottom">
<tr class="row-odd"><th class="head">Operation</th>
Expand All @@ -299,7 +299,7 @@ <h2>Number Types<a class="headerlink" href="#Number-Types" title="Permalink to t
<td>Quotient of two numbers, returned as an integer</td>
</tr>
<tr class="row-odd"><td><code class="docutils literal notranslate"><span class="pre">x</span> <span class="pre">%</span> <span class="pre">y</span></code></td>
<td><code class="docutils literal notranslate"><span class="pre">x</span></code> “modulo”: <code class="docutils literal notranslate"><span class="pre">y</span></code>: The remainder of <code class="docutils literal notranslate"><span class="pre">x</span> <span class="pre">/</span> <span class="pre">y</span></code></td>
<td><code class="docutils literal notranslate"><span class="pre">x</span></code> “modulo”: <code class="docutils literal notranslate"><span class="pre">y</span></code>: The remainder of <code class="docutils literal notranslate"><span class="pre">x</span> <span class="pre">/</span> <span class="pre">y</span></code> for positive <code class="docutils literal notranslate"><span class="pre">x</span></code>, <code class="docutils literal notranslate"><span class="pre">y</span></code></td>
</tr>
<tr class="row-even"><td><code class="docutils literal notranslate"><span class="pre">x</span> <span class="pre">**</span> <span class="pre">y</span></code></td>
<td><code class="docutils literal notranslate"><span class="pre">x</span></code> raised to the power <code class="docutils literal notranslate"><span class="pre">y</span></code></td>
Expand Down Expand Up @@ -339,7 +339,7 @@ <h2>Number Types<a class="headerlink" href="#Number-Types" title="Permalink to t
<span class="o">&gt;&gt;&gt;</span> <span class="p">(</span><span class="mi">1</span> <span class="o">+</span> <span class="mi">2</span><span class="p">)</span> <span class="o">*</span> <span class="mi">3</span>
<span class="mi">9</span>

<span class="c1"># finding the remainder of division</span>
<span class="c1"># finding the remainder of division between two positive numbers</span>
<span class="o">&gt;&gt;&gt;</span> <span class="mi">11</span> <span class="o">%</span> <span class="mi">5</span>
<span class="mi">1</span>

Expand Down Expand Up @@ -368,7 +368,7 @@ <h2>Number Types<a class="headerlink" href="#Number-Types" title="Permalink to t
</div>
<div class="admonition note">
<p class="admonition-title fa fa-exclamation-circle"><strong>Reading Comprehension: Understanding the modulo operator</strong></p>
<p>The modulo operator, <code class="docutils literal notranslate"><span class="pre">%</span></code>, is not commonly seen in mathematics textbooks. It is, however, a very useful operation to have at our disposal. <code class="docutils literal notranslate"><span class="pre">x</span> <span class="pre">%</span> <span class="pre">y</span></code> (said as x “mod” y in programmer’s jargon) returns the <em>remainder</em> of <code class="docutils literal notranslate"><span class="pre">x</span> <span class="pre">/</span> <span class="pre">y</span></code>. For example:</p>
<p>The modulo operator, <code class="docutils literal notranslate"><span class="pre">%</span></code>, is not commonly seen in mathematics textbooks. It is, however, a very useful operation to have at our disposal. <code class="docutils literal notranslate"><span class="pre">x</span> <span class="pre">%</span> <span class="pre">y</span></code> (said as x “mod” y in programmer’s jargon) returns the <em>remainder</em> of <code class="docutils literal notranslate"><span class="pre">x</span> <span class="pre">/</span> <span class="pre">y</span></code>, when <code class="docutils literal notranslate"><span class="pre">x</span></code> and `y are non-negative numbers. For example:</p>
<ul class="simple">
<li><span class="math notranslate nohighlight">\(\frac{3}{2} = 1 + \frac{1}{2}\)</span>. 2 “goes into” 3 one time, leaving a remainder of 1. Thus <code class="docutils literal notranslate"><span class="pre">3</span> <span class="pre">%</span> <span class="pre">2</span></code> returns <code class="docutils literal notranslate"><span class="pre">1</span></code></li>
<li><span class="math notranslate nohighlight">\(\frac{9}{3} = 3\)</span>. 3 “goes into” 9 three times, and leaves no remainder. Thus <code class="docutils literal notranslate"><span class="pre">9</span> <span class="pre">%</span> <span class="pre">3</span></code> returns <code class="docutils literal notranslate"><span class="pre">0</span></code></li>
Expand Down
2 changes: 1 addition & 1 deletion docs_backup/Module3_IntroducingNumpy/BasicIndexing.html
Original file line number Diff line number Diff line change
Expand Up @@ -544,7 +544,7 @@ <h3>In-Place Assignments<a class="headerlink" href="#In-Place-Assignments" title
<div class="section" id="Augmented-Assignments">
<h3>Augmented Assignments<a class="headerlink" href="#Augmented-Assignments" title="Permalink to this headline"></a></h3>
<p>Recall from our discussion of basic mathematical expressions in Python, that <a class="reference external" href="http://www.pythonlikeyoumeanit.com/Module2_EssentialsOfPython/Basic_Objects.html#Augmented-Assignment-Statements">augmented assignment expressions</a> provide a nice shorthand notation for updating the value of a variable. For example, the assignment expression <code class="docutils literal notranslate"><span class="pre">x</span> <span class="pre">=</span> <span class="pre">x</span> <span class="pre">+</span> <span class="pre">5</span></code> can be rewritten using the augmented assignment <code class="docutils literal notranslate"><span class="pre">x</span> <span class="pre">+=</span> <span class="pre">5</span></code>.</p>
<p>While <code class="docutils literal notranslate"><span class="pre">x</span> <span class="pre">+=</span> <span class="pre">5</span></code> is truly only a shorthand in the context of basic Python objects (integer,s floats, etc.), <em>augmented assignments on NumPy arrays behave fundamentally different than their long-form counterparts</em>. Specifically, they directly update the underlying data referenced by the updated array, rather than creating a distinct array, thus affecting any arrays that are views of that data. We will demonstrate this here.</p>
<p>While <code class="docutils literal notranslate"><span class="pre">x</span> <span class="pre">+=</span> <span class="pre">5</span></code> is truly only a shorthand in the context of basic Python objects (integers floats, etc.), <em>augmented assignments on NumPy arrays behave fundamentally different than their long-form counterparts</em>. Specifically, they directly update the underlying data referenced by the updated array, rather than creating a distinct array, thus affecting any arrays that are views of that data. We will demonstrate this here.</p>
<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="c1"># Demonstrating that augmented assignments on NumPy</span>
<span class="c1"># arrays update the underlying data reference by that</span>
<span class="c1"># array.</span>
Expand Down
Loading

0 comments on commit d40da42

Please sign in to comment.