powersoften

A presentation of the Powers Of_ten_ for PyData Triangle

November 1, 2017

The Nick and Tony Show

    from IPython.display import *
    from pydata.style import *
    %load_ext literacy.template
    from nbformat.v4 import *; from pathlib import Path; from nbformat import *
<IPython.core.display.Javascript object>
## RIPx Media

## Remote

* [Github](https://github.com/tonyfast/powersoften) useful static interative versions of notebooks
* [Nbviewer](http://nbviewer.jupyter.org/format/slides/github/tonyfast/powersoften/blob/gh-pages/pydata/index.ipynb#/) provides interative versions of static notebooks.  `assert \`ing `Javascript and IFrame`s still work 
* [Travis](https://travis-ci.org/tonyfast/powersoften) builds our docs ...
* ... on [Github Pages](https://tonyfast.github.io/powersoften/#/)
* [Binder](#)
* [Raw Git](https://cdn.rawgit.com/tonyfast/powersoften/gh-pages/pydata/index.html)

## Local

* [localhost](localhost:8888/files/powersoften/pydata/index.html)
* [file system](localhost:8888/files/powersoften/pydata/index.html)

RIPx Media

Remote

Local

# Topics

The major `topics = 'intro, design, systems, materials, community, media, culture'.\`  

        
        replace(' ','').split(',')

Topics

The major topics = 'intro, design, systems, materials, community, media, culture'.\

    replace(' ','').split(',')
## Notebooks


Notebooks

## Slides


Slides

## Building the Presentation

[![Build Status](https://travis-ci.org/tonyfast/powersoften.svg?branch=master)](https://travis-ci.org/tonyfast/powersoften)

Building the Presentation

Build Status

    %%file rise.py
    c.SlidesExporter.reveal_url_prefix="https://cdn.jsdelivr.net/npm/reveal.js@3.5.0"
%%file rise.py
c.SlidesExporter.reveal_url_prefix="https://cdn.jsdelivr.net/npm/reveal.js@3.5.0"


Overwriting rise.py
## Convert individual notebooks

    %%bash
    pushd pydata
    jupyter nbconvert --to slides --config rise.py  intro.ipynb 
    jupyter nbconvert --to slides --config rise.py  design.ipynb 
    jupyter nbconvert --to slides --config rise.py  systems.ipynb 
    jupyter nbconvert --to slides --config rise.py  materials.ipynb 
    jupyter nbconvert --to slides --config rise.py  community.ipynb 
    jupyter nbconvert --to slides --config rise.py  media.ipynb 
    jupyter nbconvert --to slides --config rise.py  culture.ipynb
    popd

Convert individual notebooks

%%bash
pushd pydata
jupyter nbconvert --to slides --config rise.py  intro.ipynb 
jupyter nbconvert --to slides --config rise.py  design.ipynb 
jupyter nbconvert --to slides --config rise.py  systems.ipynb 
jupyter nbconvert --to slides --config rise.py  materials.ipynb 
jupyter nbconvert --to slides --config rise.py  community.ipynb 
jupyter nbconvert --to slides --config rise.py  media.ipynb 
jupyter nbconvert --to slides --config rise.py  culture.ipynb
popd


~/build/tonyfast/powersoften/pydata ~/build/tonyfast/powersoften
~/build/tonyfast/powersoften


[NbConvertApp] Converting notebook intro.ipynb to slides
[NbConvertApp] Writing 270835 bytes to intro.slides.html
[NbConvertApp] Converting notebook design.ipynb to slides
[NbConvertApp] Writing 325765 bytes to design.slides.html
[NbConvertApp] Converting notebook systems.ipynb to slides
[NbConvertApp] Writing 293703 bytes to systems.slides.html
[NbConvertApp] Converting notebook materials.ipynb to slides
[NbConvertApp] Writing 1461256 bytes to materials.slides.html
[NbConvertApp] Converting notebook community.ipynb to slides
[NbConvertApp] Writing 347097 bytes to community.slides.html
[NbConvertApp] Converting notebook media.ipynb to slides
[NbConvertApp] Writing 443430 bytes to media.slides.html
[NbConvertApp] Converting notebook culture.ipynb to slides
[NbConvertApp] Writing 281417 bytes to culture.slides.html
## Create a master notebook.
    
    nb = new_notebook()    
    for topic in topics:
        topic = 'pydata' / Path(topic)
        cells = reads(topic.with_suffix('.ipynb').read_text(), 4).cells
        for i, cell in enumerate(cells):
            if 'slideshow' in cell['metadata'] and cell['metadata']['slideshow']['slide_type'] != 'skip':
                if i>0 and cell['cell_type'] == 'code' and cell['metadata']['slideshow']['slide_type'] =='slide': 
                    cell['metadata']['slideshow']['slide_type'] = 'subslide'
                nb.cells.append(cell)
    nb.cells.append(new_code_cell("import style", outputs=[new_output('display_data', {**{
        'text/html': [_] for _ in [css, rise_src_css]
    }, **{'application/javascript': rise_src_js}})]))
    (topic.parent / Path('index.ipynb')).write_text(writes(nb))
    !jupyter trust pydata/index.ipynb
    !jupyter nbconvert --to slides --config rise.py pydata/index.ipynb 
    !cp pydata/index.slides.html pydata/index.html

Create a master notebook.

nb = new_notebook()    
for topic in topics:
    topic = 'pydata' / Path(topic)
    cells = reads(topic.with_suffix('.ipynb').read_text(), 4).cells
    for i, cell in enumerate(cells):
        if 'slideshow' in cell['metadata'] and cell['metadata']['slideshow']['slide_type'] != 'skip':
            if i>0 and cell['cell_type'] == 'code' and cell['metadata']['slideshow']['slide_type'] =='slide': 
                cell['metadata']['slideshow']['slide_type'] = 'subslide'
            nb.cells.append(cell)
nb.cells.append(new_code_cell("import style", outputs=[new_output('display_data', {**{
    'text/html': [_] for _ in [css, rise_src_css]
}, **{'application/javascript': rise_src_js}})]))
(topic.parent / Path('index.ipynb')).write_text(writes(nb))
!jupyter trust pydata/index.ipynb
!jupyter nbconvert --to slides --config rise.py pydata/index.ipynb 
!cp pydata/index.slides.html pydata/index.html


[TrustNotebookApp] Writing notebook-signing key to /home/travis/.local/share/jupyter/notebook_secret
Signing notebook: pydata/index.ipynb
[NbConvertApp] Converting notebook pydata/index.ipynb to slides
[NbConvertApp] Writing 1840849 bytes to pydata/index.slides.html
    !jupyter nbconvert --to markdown --TemplateExporter.exclude_input=True readme.ipynb
!jupyter nbconvert --to markdown --TemplateExporter.exclude_input=True readme.ipynb


[NbConvertApp] Converting notebook readme.ipynb to markdown
[NbConvertApp] Writing 5612 bytes to readme.md