Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion 2 ch01/analyze_webstats.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
import matplotlib.pyplot as plt

data_dir = os.path.join(
os.path.dirname(os.path.realpath(__file__)), "..", "data")
os.path.dirname(os.path.realpath(__file__)), ".", "data")
data = sp.genfromtxt(os.path.join(data_dir, "web_traffic.tsv"), delimiter="\t")
print(data[:10])

Expand Down
16 changes: 8 additions & 8 deletions 16 ch01/web_traffic.tsv → ch01/data/web_traffic.tsv
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
1 2272
2 nan
2 1656
3 1386
4 1365
5 1488
Expand All @@ -20,7 +20,7 @@
20 1246
21 1071
22 1876
23 nan
23 1402
24 1410
25 925
26 1533
Expand All @@ -45,7 +45,7 @@
45 1723
46 2160
47 808
48 nan
48 1322
49 1324
50 1809
51 1933
Expand Down Expand Up @@ -92,7 +92,7 @@
92 1216
93 981
94 1345
95 nan
95 2159
96 1667
97 730
98 1034
Expand Down Expand Up @@ -151,7 +151,7 @@
151 1606
152 1065
153 1291
154 nan
154 1369
155 1495
156 1928
157 2249
Expand All @@ -177,8 +177,8 @@
177 1578
178 1872
179 1669
180 nan
181 nan
180 2454
181 1484
182 1407
183 1619
184 894
Expand Down Expand Up @@ -207,7 +207,7 @@
207 1329
208 1781
209 1242
210 nan
210 1286
211 1454
212 1501
213 875
Expand Down
2 changes: 1 addition & 1 deletion 2 ch01/gen_webstats.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
plt.savefig(os.path.join("..", "1400_01_01.png"))

data_dir = os.path.join(
os.path.dirname(os.path.realpath(__file__)), "..", "data")
os.path.dirname(os.path.realpath(__file__)), ".", "data")

# sp.savetxt(os.path.join("..", "web_traffic.tsv"),
# zip(x[~y.mask],y[~y.mask]), delimiter="\t", fmt="%i")
Expand Down
Morty Proxy This is a proxified and sanitized view of the page, visit original site.