This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ jupyter nbconvert notebooks/hello_world.ipynb --output-dir build |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ jupyter nbconvert notebooks/fibonacci_plot.ipynb --output-dir build --no-input |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# source: https://stackoverflow.com/a/28073228/9988333 | |
from IPython.display import HTML | |
HTML( | |
"""<script> | |
code_show=true; | |
function code_toggle() { | |
if (code_show){ | |
$('div.input').hide(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ jupyter nbconvert notebooks/fibonacci_plot.ipynb \ | |
--TagRemovePreprocessor.enabled=True \ | |
--TagRemovePreprocessor.remove_input_tags "remove-input" \ | |
--TagRemovePreprocessor.remove_all_outputs_tags "remove-output" \ | |
--no-prompt \ | |
--output-dir build \ | |
--template classic \ | |
--to html |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
flake8 my_script.py |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
nbqa flake8 my_notebook.ipynb |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- repo: https://github.com/nbQA-dev/nbQA | |
rev: 0.10.0 | |
hooks: | |
- id: nbqa-flake8 | |
- id: nbqa-isort | |
- id: nbqa-mypy | |
- id: nbqa-black |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pip install requests |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import requests | |
import os | |
data = requests.get('https://api.github.com/search/issues?q=is:pr+repo:pandas-dev/pandas+author:marcogorelli+is:merged').json() | |
print(f"Merged PRs: {data['total_count']}") | |
url = 'https://api.github.com/graphql' | |
query = ( | |
""" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import arviz as az | |
import pymc3 as pm | |
N = 1000 | |
N_HEADS = 292 | |
with pm.Model() as model: | |
theta = pm.Beta("θ", alpha=1.0, beta=1.0) | |
y = pm.Binomial("y", n=N, p=theta, observed=N_HEADS) | |
trace = pm.sample(return_inferencedata=True) |
OlderNewer