Movatterモバイル変換


[0]ホーム

URL:


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

Add hacker-stats notebooks#98

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Open
hugobowne wants to merge1 commit intomaster
base:master
Choose a base branch
Loading
fromhugobowne-patch-1
Open

Conversation

@hugobowne
Copy link
Collaborator

@hugobownehugobowne commentedNov 11, 2020
edited
Loading

@ericmjl as discussed in#97.

These NBs run programmatically but there's the small issue of data access: I think I need to mimic something you did and use some utility functions in the NBs to load the data?

We can discuss tomorrow but it may be worth adding some instructions to#97 so others can reproduce, if and when necessary.

Cool!

@review-notebook-app
Copy link

Check out this pull request on ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered byReviewNB

Copy link
Owner

@ericmjlericmjl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Cool beans, thanks@hugobowne!

I've dropped a few comments here that should help with organizing things nicely.

The only one I couldn't drop a comment for is the filenames for the notebooks; could you give them a shorter names, perhaps "01-simulated-probability.ipynb" and "02-parameter-estimation.ipynb"? Doing so makes managing themkdocs.yml file navigation section just that teeny bit easier.

@@ -0,0 +1,74 @@
import pandas as pd
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

I think the entiredata.py can be placed inside the project'ssrc/bayes_tutorial/data.py; there's some data loaders already in there. Inside the notebooks, it should be a small change to get the data imported:

frombayes_tutorial.dataimport<thenecessaryfunctions>

Copy link
CollaboratorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

HBA to move all data imports intosrc/bayes_tutorial/data.py (w/out duplication).

Edit import calls in NBs

@@ -0,0 +1,5 @@
axes.spines.left : True # display axis spines
Copy link
Owner

@ericmjlericmjlNov 11, 2020
edited
Loading

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

I like the style sheet; let's get this one used across the entire series.

According to theMatplotlib docs, we can reference it from a single source of truth using the following pattern:

importmatplotlib.pyplotaspltplt.style.use('./images/presentation.mplstyle')

I'd like to propose that we use the style sheet by doing the following:

  1. Place thematplotlibrc file in the project root directory.
  2. Reference it at the top of every notebook (I'll take care of that for the other notebooks I've written), using the following pattern:
importmatplotlib.pyplotaspltfrompyprojrootimporthereplt.style.use(here()/"matplotlibrc")

What do you think,@hugobowne?

Copy link
CollaboratorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

HBA to movematplotlibrc intoconfig/matplotibrc

and load at top of both NBs.

@@ -0,0 +1,19 @@
import numpy as np
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Theutils.py module can probably be moved to the pathsrc/bayes_tutorial/utils.py, which would allow us to use it across all of the notebooks.

Copy link
CollaboratorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

HBA to do

Comment on lines +11 to +13
def despine(ax):
ax.spines['right'].set_visible(False)
ax.spines['top'].set_visible(False)
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

With thematplotlibrc file in place, do we need this function? If so, we keep it.

Copy link
CollaboratorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

I don't think I wrote any of this 👯‍♂️

Comment on lines +16 to +19
def despine_traceplot(traceplot):
for row in traceplot:
for ax in row:
despine(ax) No newline at end of file
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Ditto with this function; if we havematplotlibrc, is this function still needed? If so, we keep it.

Copy link
CollaboratorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

👯‍♂️

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@ericmjlericmjlericmjl requested changes

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

3 participants

@hugobowne@ericmjl

[8]ページ先頭

©2009-2025 Movatter.jp