Permalink
Browse files

Update another lecture

  • Loading branch information...
1 parent 900b1ff commit 2bb6a6cc0a6d63d50bd0b143680aa070110e53ab @csev committed Sep 23, 2016
View
@@ -8,7 +8,7 @@
if len(address) < 1: break
url = serviceurl + urllib.parse.urlencode(
- {'sensor': 'false', 'address': address})
+ {'address': address})
print('Retrieving', url)
uh = urllib.request.urlopen(url)
View
@@ -7,8 +7,7 @@
address = input('Enter location: ')
if len(address) < 1: break
- url = serviceurl + urllib.parse.urlencode({'sensor': 'false',
- 'address': address})
+ url = serviceurl + urllib.parse.urlencode({'address': address})
print('Retrieving', url)
uh = urllib.request.urlopen(url)
data = uh.read()
View
@@ -1,7 +1,8 @@
import urllib.request, urllib.parse, urllib.error
-counts = dict()
fhand = urllib.request.urlopen('http://data.pr4e.org/romeo.txt')
+
+counts = dict()
for line in fhand:
words = line.decode().split()
for word in words:
View
Binary file not shown.
View
Oops, something went wrong.
View
@@ -1,3 +1,3 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
-<svg xmlns="http://www.w3.org/2000/svg" xmlns:xl="http://www.w3.org/1999/xlink" version="1.1" viewBox="16 16 391 202" width="391pt" height="202pt" xmlns:dc="http://purl.org/dc/elements/1.1/"><metadata> Produced by OmniGraffle 6.4.1 <dc:date>2016-01-16 20:25:02 +0000</dc:date></metadata><defs><font-face font-family="Helvetica Neue" font-size="16" panose-1="2 0 5 3 0 0 0 2 0 4" units-per-em="1000" underline-position="-100" underline-thickness="50" slope="0" x-height="517" cap-height="714" ascent="951.99585" descent="-212.99744" font-weight="500"><font-face-src><font-face-name name="HelveticaNeue"/></font-face-src></font-face><font-face font-family="Helvetica Neue" font-size="14" panose-1="2 0 5 3 0 0 0 2 0 4" units-per-em="1000" underline-position="-100" underline-thickness="50" slope="0" x-height="517" cap-height="714" ascent="951.99585" descent="-212.99744" font-weight="500"><font-face-src><font-face-name name="HelveticaNeue"/></font-face-src></font-face></defs><g stroke="none" stroke-opacity="1" stroke-dasharray="none" fill="none" fill-opacity="1"><title>Canvas 1</title><rect fill="white" width="545" height="495"/><g><title>Layer 1</title><rect x="18" y="18" width="135" height="180" fill="white"/><rect x="18" y="18" width="135" height="180" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-width="1"/><text transform="translate(23 23)" fill="black"><tspan font-family="Helvetica Neue" font-size="16" font-weight="500" x="46.5" y="15" textLength="10.368">Y</tspan><tspan font-family="Helvetica Neue" font-size="16" font-weight="500" x="55.092" y="15" textLength="23.408">our</tspan><tspan font-family="Helvetica Neue" font-size="16" font-weight="500" x="31.828" y="33" textLength="15.696">Pr</tspan><tspan font-family="Helvetica Neue" font-size="16" font-weight="500" x="47.236" y="33" textLength="45.936">ogram</tspan></text><rect x="135" y="72" width="27" height="108" fill="#00bfc0"/><rect x="135" y="72" width="27" height="108" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-width="1"/><text transform="translate(140 78)" fill="black"><tspan font-family="Helvetica Neue" font-size="14" font-weight="500" x="3.964" y="13" textLength="9.072">S</tspan><tspan font-family="Helvetica Neue" font-size="14" font-weight="500" x="3.18" y="29" textLength="10.64">O</tspan><tspan font-family="Helvetica Neue" font-size="14" font-weight="500" x="3.446" y="45" textLength="10.108">C</tspan><tspan font-family="Helvetica Neue" font-size="14" font-weight="500" x="3.831" y="61" textLength="9.338">K</tspan><tspan font-family="Helvetica Neue" font-size="14" font-weight="500" x="4.223" y="77" textLength="8.554">E</tspan><tspan font-family="Helvetica Neue" font-size="14" font-weight="500" x="4.482" y="93" textLength="8.036">T</tspan></text><rect x="63" y="72" width="72" height="27" fill="white"/><rect x="63" y="72" width="72" height="27" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-width="1"/><text transform="translate(68 76.5)" fill="black"><tspan font-family="Helvetica Neue" font-size="16" font-weight="500" x="7.144" y="15" textLength="47.712">socket</tspan></text><rect x="63" y="99" width="72" height="27" fill="white"/><rect x="63" y="99" width="72" height="27" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-width="1"/><text transform="translate(68 103.5)" fill="black"><tspan font-family="Helvetica Neue" font-size="16" font-weight="500" x="2.104" y="15" textLength="57.792">connect</tspan></text><rect x="63" y="126" width="72" height="27" fill="white"/><rect x="63" y="126" width="72" height="27" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-width="1"/><text transform="translate(68 130.5)" fill="black"><tspan font-family="Helvetica Neue" font-size="16" font-weight="500" x="13.512" y="15" textLength="34.976">send</tspan></text><rect x="63" y="153" width="72" height="27" fill="white"/><rect x="63" y="153" width="72" height="27" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-width="1"/><text transform="translate(68 157.5)" fill="black"><tspan font-family="Helvetica Neue" font-size="16" font-weight="500" x="15.888" y="15" textLength="5.328">r</tspan><tspan font-family="Helvetica Neue" font-size="16" font-weight="500" x="20.928" y="15" textLength="25.184">ecv</tspan></text><path d="M 224.98659 127.63458 C 191.53125 117 204.8724 27.4743 258.24114 42.75 C 263.19258 12.97278 325.25325 17.80596 324.84753 42.75 C 363.76146 10.84626 413.49114 74.46168 380.13516 106.36542 C 420.16068 121.83318 379.63008 205.17138 346.78125 191.25 C 344.15235 214.45362 285.42852 222.5736 280.27422 191.25 C 247.02174 224.7021 177.68502 173.26764 224.98659 127.63458 Z" fill="white"/><path d="M 224.98659 127.63458 C 191.53125 117 204.8724 27.4743 258.24114 42.75 C 263.19258 12.97278 325.25325 17.80596 324.84753 42.75 C 363.76146 10.84626 413.49114 74.46168 380.13516 106.36542 C 420.16068 121.83318 379.63008 205.17138 346.78125 191.25 C 344.15235 214.45362 285.42852 222.5736 280.27422 191.25 C 247.02174 224.7021 177.68502 173.26764 224.98659 127.63458 Z" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-width="1"/><text transform="translate(212 58)" fill="black"><tspan font-family="Helvetica Neue" font-size="16" font-weight="500" x="9.212" y="15" textLength="36.384">www</tspan><tspan font-family="Helvetica Neue" font-size="16" font-weight="500" x="44.716" y="15" textLength="80.016">.pythonlear</tspan><tspan font-family="Helvetica Neue" font-size="16" font-weight="500" x="125.02" y="15" textLength="44.768">n.com</tspan><tspan font-family="Helvetica Neue" font-size="16" font-weight="500" x="48.916" y="51" textLength="14.816">W</tspan><tspan font-family="Helvetica Neue" font-size="16" font-weight="500" x="62.82" y="51" textLength="67.264">eb Pages</tspan><tspan font-family="Helvetica Neue" font-size="16" font-weight="500" x="87.276" y="69" textLength="4.448">.</tspan><tspan font-family="Helvetica Neue" font-size="16" font-weight="500" x="87.276" y="87" textLength="4.448">.</tspan><tspan font-family="Helvetica Neue" font-size="16" font-weight="500" x="87.276" y="105" textLength="4.448">.</tspan></text><rect x="162" y="108" width="81" height="27" fill="#00bfc0"/><rect x="162" y="108" width="81" height="27" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-width="1"/><text transform="translate(167 112.5)" fill="black"><tspan font-family="Helvetica Neue" font-size="16" font-weight="500" fill="black" x="18.84" y="15" textLength="52.16">Port 80</tspan></text></g></g></svg>
+<svg xmlns="http://www.w3.org/2000/svg" xmlns:xl="http://www.w3.org/1999/xlink" version="1.1" viewBox="16 16 391 202" width="391pt" height="202pt" xmlns:dc="http://purl.org/dc/elements/1.1/"><metadata> Produced by OmniGraffle 6.6 <dc:date>2016-09-23 19:48:58 +0000</dc:date></metadata><defs><font-face font-family="Helvetica Neue" font-size="16" panose-1="2 0 5 3 0 0 0 2 0 4" units-per-em="1000" underline-position="-100" underline-thickness="50" slope="0" x-height="517" cap-height="714" ascent="951.99585" descent="-212.99744" font-weight="500"><font-face-src><font-face-name name="HelveticaNeue"/></font-face-src></font-face><font-face font-family="Helvetica Neue" font-size="14" panose-1="2 0 5 3 0 0 0 2 0 4" units-per-em="1000" underline-position="-100" underline-thickness="50" slope="0" x-height="517" cap-height="714" ascent="951.99585" descent="-212.99744" font-weight="500"><font-face-src><font-face-name name="HelveticaNeue"/></font-face-src></font-face></defs><g stroke="none" stroke-opacity="1" stroke-dasharray="none" fill="none" fill-opacity="1"><title>Canvas 1</title><rect fill="white" width="545" height="495"/><g><title>Layer 1</title><rect x="18" y="18" width="135" height="180" fill="white"/><rect x="18" y="18" width="135" height="180" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-width="1"/><text transform="translate(23 23)" fill="black"><tspan font-family="Helvetica Neue" font-size="16" font-weight="500" x="46.5" y="15" textLength="10.368">Y</tspan><tspan font-family="Helvetica Neue" font-size="16" font-weight="500" x="55.092" y="15" textLength="23.408">our</tspan><tspan font-family="Helvetica Neue" font-size="16" font-weight="500" x="31.828" y="33.447998" textLength="15.696">Pr</tspan><tspan font-family="Helvetica Neue" font-size="16" font-weight="500" x="47.236" y="33.447998" textLength="45.936">ogram</tspan></text><rect x="135" y="72" width="27" height="108" fill="#00bfc0"/><rect x="135" y="72" width="27" height="108" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-width="1"/><text transform="translate(140 76.824005)" fill="black"><tspan font-family="Helvetica Neue" font-size="14" font-weight="500" x="3.964" y="13" textLength="9.072">S</tspan><tspan font-family="Helvetica Neue" font-size="14" font-weight="500" x="3.18" y="29.391998" textLength="10.64">O</tspan><tspan font-family="Helvetica Neue" font-size="14" font-weight="500" x="3.446" y="45.783997" textLength="10.108">C</tspan><tspan font-family="Helvetica Neue" font-size="14" font-weight="500" x="3.831" y="62.175995" textLength="9.338">K</tspan><tspan font-family="Helvetica Neue" font-size="14" font-weight="500" x="4.223" y="78.567993" textLength="8.554">E</tspan><tspan font-family="Helvetica Neue" font-size="14" font-weight="500" x="4.482" y="94.95999" textLength="8.036">T</tspan></text><rect x="63" y="72" width="72" height="27" fill="white"/><rect x="63" y="72" width="72" height="27" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-width="1"/><text transform="translate(68 76.276)" fill="black"><tspan font-family="Helvetica Neue" font-size="16" font-weight="500" x="7.144" y="15" textLength="47.712">socket</tspan></text><rect x="63" y="99" width="72" height="27" fill="white"/><rect x="63" y="99" width="72" height="27" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-width="1"/><text transform="translate(68 103.276)" fill="black"><tspan font-family="Helvetica Neue" font-size="16" font-weight="500" x="2.104" y="15" textLength="57.792">connect</tspan></text><rect x="63" y="126" width="72" height="27" fill="white"/><rect x="63" y="126" width="72" height="27" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-width="1"/><text transform="translate(68 130.276)" fill="black"><tspan font-family="Helvetica Neue" font-size="16" font-weight="500" x="13.512" y="15" textLength="34.976">send</tspan></text><rect x="63" y="153" width="72" height="27" fill="white"/><rect x="63" y="153" width="72" height="27" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-width="1"/><text transform="translate(68 157.276)" fill="black"><tspan font-family="Helvetica Neue" font-size="16" font-weight="500" x="15.888" y="15" textLength="5.328">r</tspan><tspan font-family="Helvetica Neue" font-size="16" font-weight="500" x="20.928" y="15" textLength="25.184">ecv</tspan></text><path d="M 224.98659 127.63458 C 191.53125 117 204.8724 27.4743 258.24114 42.75 C 263.19258 12.97278 325.25325 17.80596 324.84753 42.75 C 363.76146 10.84626 413.49114 74.46168 380.13516 106.36542 C 420.16068 121.83318 379.63008 205.17138 346.78125 191.25 C 344.15235 214.45362 285.42852 222.5736 280.27422 191.25 C 247.02174 224.7021 177.68502 173.26764 224.98659 127.63458 Z" fill="white"/><path d="M 224.98659 127.63458 C 191.53125 117 204.8724 27.4743 258.24114 42.75 C 263.19258 12.97278 325.25325 17.80596 324.84753 42.75 C 363.76146 10.84626 413.49114 74.46168 380.13516 106.36542 C 420.16068 121.83318 379.63008 205.17138 346.78125 191.25 C 344.15235 214.45362 285.42852 222.5736 280.27422 191.25 C 247.02174 224.7021 177.68502 173.26764 224.98659 127.63458 Z" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-width="1"/><text transform="translate(212 58.380005)" fill="black"><tspan font-family="Helvetica Neue" font-size="16" font-weight="500" x="34.1" y="15" textLength="36.384">www</tspan><tspan font-family="Helvetica Neue" font-size="16" font-weight="500" x="69.604" y="15" textLength="75.296">.py4e.com</tspan><tspan font-family="Helvetica Neue" font-size="16" font-weight="500" x="48.916" y="51.447998" textLength="14.816">W</tspan><tspan font-family="Helvetica Neue" font-size="16" font-weight="500" x="62.82" y="51.447998" textLength="67.264">eb Pages</tspan><tspan font-family="Helvetica Neue" font-size="16" font-weight="500" x="87.276" y="69.895996" textLength="4.448">.</tspan><tspan font-family="Helvetica Neue" font-size="16" font-weight="500" x="87.276" y="88.343994" textLength="4.448">.</tspan><tspan font-family="Helvetica Neue" font-size="16" font-weight="500" x="87.276" y="106.79199" textLength="4.448">.</tspan></text><rect x="162" y="108" width="81" height="27" fill="#00bfc0"/><rect x="162" y="108" width="81" height="27" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-width="1"/><text transform="translate(167 112.276)" fill="black"><tspan font-family="Helvetica Neue" font-size="16" font-weight="500" x="18.84" y="15" textLength="52.16">Port 80</tspan></text></g></g></svg>
Binary file not shown.
Binary file not shown.

0 comments on commit 2bb6a6c

Please sign in to comment.