Skip to content

Commit a2b1554

Browse files
update
1 parent d9ab095 commit a2b1554

File tree

4 files changed

+28
-36
lines changed

4 files changed

+28
-36
lines changed

docs/code/python_foundation/09_reading_files.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
"cell_type": "markdown",
3030
"metadata": {},
3131
"source": [
32-
"To open a file, we need to know the path to the file. We will now open and read the file `worldcitites.csv` located in your data package. In your data package the data folder is in the `data/` directory. We can construct the relative path to the file using the `os.path.join()` method."
32+
"To open a file, we need to know the path to the file. We will now open and read the file `worldcities.csv` located in your data package. In your data package the data folder is in the `data/` directory. We can construct the relative path to the file using the `os.path.join()` method."
3333
]
3434
},
3535
{

docs/python-foundation-output/09_reading_files.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ To read a file, we must know the path of the file on the disk. Python has a modu
99
import os
1010
```
1111

12-
To open a file, we need to know the path to the file. We will now open and read the file `worldcitites.csv` located in your data package. In your data package the data folder is in the `data/` directory. We can construct the relative path to the file using the `os.path.join()` method.
12+
To open a file, we need to know the path to the file. We will now open and read the file `worldcities.csv` located in your data package. In your data package the data folder is in the `data/` directory. We can construct the relative path to the file using the `os.path.join()` method.
1313

1414

1515
```python

docs/python-foundation.html

Lines changed: 25 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@
1414

1515
<title>Python Foundation for Spatial Analysis (Full Course)</title>
1616

17-
<script src="site_libs/header-attrs-2.21/header-attrs.js"></script>
18-
<script src="site_libs/jquery-3.6.0/jquery-3.6.0.min.js"></script>
17+
<script src="site_libs/header-attrs-2.10/header-attrs.js"></script>
18+
<script src="site_libs/jquery-1.11.3/jquery.min.js"></script>
1919
<meta name="viewport" content="width=device-width, initial-scale=1" />
2020
<link href="site_libs/bootstrap-3.3.5/css/flatly.min.css" rel="stylesheet" />
2121
<script src="site_libs/bootstrap-3.3.5/js/bootstrap.min.js"></script>
@@ -53,7 +53,6 @@
5353
</style>
5454

5555

56-
5756
<style type="text/css">
5857
code {
5958
white-space: pre;
@@ -75,7 +74,7 @@
7574
}
7675
@media print {
7776
pre > code.sourceCode { white-space: pre-wrap; }
78-
pre > code.sourceCode > span { text-indent: -5em; padding-left: 5em; }
77+
pre > code.sourceCode > span { display: inline-block; text-indent: -5em; padding-left: 5em; }
7978
}
8079
pre.numberSource code
8180
{ counter-reset: source-line 0; }
@@ -135,20 +134,13 @@
135134
for (var i = 0; i < sheets.length; i++) {
136135
if (sheets[i].ownerNode.dataset["origin"] !== "pandoc") continue;
137136
try { var rules = sheets[i].cssRules; } catch (e) { continue; }
138-
var j = 0;
139-
while (j < rules.length) {
137+
for (var j = 0; j < rules.length; j++) {
140138
var rule = rules[j];
141139
// check if there is a div.sourceCode rule
142-
if (rule.type !== rule.STYLE_RULE || rule.selectorText !== "div.sourceCode") {
143-
j++;
144-
continue;
145-
}
140+
if (rule.type !== rule.STYLE_RULE || rule.selectorText !== "div.sourceCode") continue;
146141
var style = rule.style.cssText;
147142
// check if color or background-color is set
148-
if (rule.style.color === '' && rule.style.backgroundColor === '') {
149-
j++;
150-
continue;
151-
}
143+
if (rule.style.color === '' && rule.style.backgroundColor === '') continue;
152144
// replace div.sourceCode by a pre.sourceCode rule
153145
sheets[i].deleteRule(j);
154146
sheets[i].insertRule('pre.sourceCode{' + style + '}', j);
@@ -184,9 +176,6 @@
184176
summary {
185177
display: list-item;
186178
}
187-
details > summary > p:only-child {
188-
display: inline;
189-
}
190179
pre code {
191180
padding: 0;
192181
}
@@ -243,15 +232,11 @@
243232
href = "index.html";
244233
var menuAnchor = $('a[href="' + href + '"]');
245234

246-
// mark the anchor link active (and if it's in a dropdown, also mark that active)
247-
var dropdown = menuAnchor.closest('li.dropdown');
248-
if (window.bootstrap) { // Bootstrap 4+
249-
menuAnchor.addClass('active');
250-
dropdown.find('> .dropdown-toggle').addClass('active');
251-
} else { // Bootstrap 3
252-
menuAnchor.parent().addClass('active');
253-
dropdown.addClass('active');
254-
}
235+
// mark it active
236+
menuAnchor.tab('show');
237+
238+
// if it's got a parent navbar menu mark it active as well
239+
menuAnchor.closest('li.dropdown').addClass('active');
255240

256241
// Navbar adjustments
257242
var navHeight = $(".navbar").first().height() + 15;
@@ -280,20 +265,27 @@
280265
border-radius: 4px;
281266
}
282267

283-
.tabset-dropdown > .nav-tabs > li.active:before, .tabset-dropdown > .nav-tabs.nav-tabs-open:before {
284-
content: "\e259";
268+
.tabset-dropdown > .nav-tabs > li.active:before {
269+
content: "";
285270
font-family: 'Glyphicons Halflings';
286271
display: inline-block;
287272
padding: 10px;
288273
border-right: 1px solid #ddd;
289274
}
290275

291276
.tabset-dropdown > .nav-tabs.nav-tabs-open > li.active:before {
292-
content: "\e258";
293-
font-family: 'Glyphicons Halflings';
277+
content: "&#xe258;";
294278
border: none;
295279
}
296280

281+
.tabset-dropdown > .nav-tabs.nav-tabs-open:before {
282+
content: "";
283+
font-family: 'Glyphicons Halflings';
284+
display: inline-block;
285+
padding: 10px;
286+
border-right: 1px solid #ddd;
287+
}
288+
297289
.tabset-dropdown > .nav-tabs > li.active {
298290
display: block;
299291
}
@@ -335,7 +327,7 @@
335327
<div class="navbar navbar-default navbar-fixed-top" role="navigation">
336328
<div class="container">
337329
<div class="navbar-header">
338-
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-bs-toggle="collapse" data-target="#navbar" data-bs-target="#navbar">
330+
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar">
339331
<span class="icon-bar"></span>
340332
<span class="icon-bar"></span>
341333
<span class="icon-bar"></span>
@@ -2127,8 +2119,8 @@ <h1>Reading Files</h1>
21272119
<div class="sourceCode" id="cb115"><pre
21282120
class="sourceCode python"><code class="sourceCode python"><span id="cb115-1"><a href="#cb115-1" tabindex="-1"></a><span class="im">import</span> os</span></code></pre></div>
21292121
<p>To open a file, we need to know the path to the file. We will now
2130-
open and read the file <code>worldcitites.csv</code> located in your
2131-
data package. In your data package the data folder is in the
2122+
open and read the file <code>worldcities.csv</code> located in your data
2123+
package. In your data package the data folder is in the
21322124
<code>data/</code> directory. We can construct the relative path to the
21332125
file using the <code>os.path.join()</code> method.</p>
21342126
<div class="sourceCode" id="cb116"><pre

python-foundation-output/09_reading_files.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ To read a file, we must know the path of the file on the disk. Python has a modu
99
import os
1010
```
1111

12-
To open a file, we need to know the path to the file. We will now open and read the file `worldcitites.csv` located in your data package. In your data package the data folder is in the `data/` directory. We can construct the relative path to the file using the `os.path.join()` method.
12+
To open a file, we need to know the path to the file. We will now open and read the file `worldcities.csv` located in your data package. In your data package the data folder is in the `data/` directory. We can construct the relative path to the file using the `os.path.join()` method.
1313

1414

1515
```python

0 commit comments

Comments
 (0)