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

Sign up
Appearance settings

Commit e4f7a72

Browse files
Merge pull request #14 from quantopian/remove-unnecessary-comments
Removed unnecessary code comments from scipts
2 parents 0c1e084 + 027aa62 commit e4f7a72

File tree

4 files changed

+2
-24
lines changed

4 files changed

+2
-24
lines changed

‎Chapter2_MorePyMC/separation_plot.py‎

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,10 @@ def separation_plot( p, y, **kwargs ):
2626
p = p.reshape( n, 1 )
2727
M = p.shape[1]
2828

29-
#colors = np.array( ["#fdf2db", "#e44a32"] )
3029
colors_bmh = np.array( ["#eeeeee", "#348ABD"] )
3130

3231

33-
fig = plt.figure( )#figsize = (8, 1.3*M) )
32+
fig = plt.figure( )
3433

3534
for i in range(M):
3635
ax = fig.add_subplot(M, 1, i+1)
@@ -43,8 +42,6 @@ def separation_plot( p, y, **kwargs ):
4342
linewidth = 1.,drawstyle="steps-post" )
4443
#create expected value bar.
4544
ax.vlines( [(1-p[ix,i]).sum()], [0], [1] )
46-
#ax.grid(False)
47-
#ax.axis('off')
4845
plt.xlim( 0, n)
4946

5047
plt.tight_layout()

‎Chapter4_TheGreatestTheoremNeverTold/top_crazyideas_submissions.py‎

Lines changed: 1 addition & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -16,31 +16,14 @@
1616
i = 0
1717
while i < n_sub:
1818
top_submission = next(top_submissions)
19-
#while "i.imgur.com" not in top_submission.url:
20-
# #make sure it is linking to an image, not a webpage.
21-
# top_submission = next(top_submissions)
2219
i+=1
2320

24-
#print("Post contents: \n", top_submission.title)
2521
top_post = top_submission.title
26-
#top_submission.replace_more_comments(limit=5, threshold=0)
27-
#print(top_post_url)
2822

2923
upvotes = []
3024
downvotes = []
3125
contents = []
32-
"""_all_comments = top_submission.comments
33-
all_comments=[]
34-
for comment in _all_comments:
35-
try:
36-
#ups = int(round((ratio*comment.score)/(2*ratio - 1)) if ratio != 0.5 else round(comment.score/2))
37-
#upvotes.append(ups)
38-
#downvotes.append(ups - comment.score)
39-
scores.append( comment.score )
40-
contents.append( comment.body )
41-
except Exception as e:
42-
continue
43-
"""
26+
4427
for sub in top_submissions:
4528
try:
4629
ratio = reddit.get_submission(sub.permalink).upvote_ratio

‎Chapter5_LossFunctions/draw_sky2.py‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ def draw_sky(galaxies):
66
"""adapted from Vishal Goklani"""
77
size_multiplier = 45
88
fig = plt.figure(figsize=(10,10))
9-
#fig.patch.set_facecolor("blue")
109
ax = fig.add_subplot(111, aspect='equal')
1110
n = galaxies.shape[0]
1211
for i in range(n):

‎Chapter6_Priorities/other_strats.py‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33

44
import scipy.stats as stats
55
import numpy as np
6-
#from pymc import rbeta
76

87
rand = np.random.rand
98
beta = stats.beta

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /