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
#!/usr/bin/env python | |
# coding: utf-8 | |
# This notebook illustrates the use of a utility, `InferenceWrapper.df_to_emb` that can be used to perform inference in bulk. | |
# - **checkpointed model** (2.29 GB): | |
# `https://storage.googleapis.com/issue_label_bot/model/lang_model/models_22zkdqlr/best_22zkdqlr.pth` | |
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
<link href="https://unpkg.com/@primer/css/dist/primer.css" rel="stylesheet" /> | |
<div class="Toast"> | |
<span class="Toast-icon"> | |
{% octicon info %} | |
</span> | |
<span class="Toast-content">You can add these components, too!</span> | |
</div> |
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
from vega_datasets import data as vega_data | |
import pandas as pd | |
import altair as alt | |
data = pd.read_json(vega_data.gapminder.url) | |
data2000 = data.loc[data['year'] == 2000] | |
chart1 = alt.Chart(data2000).mark_line().encode( | |
alt.X('fertility:Q'), |
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
from nbdev import export2html | |
from nbdev.export2html import Config, Path, _re_digits | |
## Monkey Patch Nbdev For Jupyter Blog Posts ## | |
def _nb2htmlfname(nb_path, dest): | |
if dest is None: dest = Config().doc_path | |
return Path(dest)/_re_digits.sub('', nb_path.with_suffix('.md').name) | |
## apply monkey patch | |
export2html._nb2htmlfname = _nb2htmlfname |
-
Sally creates this notebook which contain interactive visualizations. She saves the notebook to GitHub.
-
Sally wants to share this report with her colleagues on twitter, preferrably as a blog post. However, she cannot share her notebook via a GitHub link due of the following issues:
- GitHub doesn't support rendering her interactive visualizations, even when all the code is client side, like the case with Vega-Lite or Altair. (That is why you don't see any visualizations in this notebook on GitHub!)
- There is no place for colleague to comment on the notebook or provide feedback easily.
- Sally wants to hide / show code to make the document easier to read, and remove extreanous information. It is impossible to do this without copying her notebook and creating an alternate version.
- Sally needs the ability to hide/show code in collapsable cells in certain
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
name: Binder | |
on: | |
pull_request: | |
types: [opened, reopened] | |
jobs: | |
Create-Binder-Badge: | |
runs-on: ubuntu-latest | |
steps: |
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
from multiprocessing import Pool | |
from time import sleep | |
def f(x): | |
sleep(1000) # simulate some computation | |
return x*x | |
if __name__ == '__main__': | |
with Pool(8) as p: | |
print(p.map(f, range(8))) |
Criteria | @danfrankj | @hamelsmu |
---|---|---|
Row One | ||
Row Two | -[ ] | -[x] |