Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Computable content: Notebooks, containers, and data-centric organizational learning


Published on

by Paco Nathan
Director, Learning Group at O’Reilly Media

This talk will present:

* the system architecture based on Jupyter as middleware, plus Thebe, Docker, Mesos, Nginx, etc.

* data analytics and project experiences based on delivering _computable content_ at scale

* supporting theory for this pedagogical approach, including Knuth’s _Literate Programming_

* media production techniques that use the video as _subtext_

We will also consider the use of notebooks (Jupyter and others) in an organizational context: how do notebooks help teams share and learn? what impact might notebooks have on developer collaboration that is currently focused on IDEs? The resulting medium provides highly effective tooling for a data-centric organization.

Published in: Technology
  • Be the first to comment

  • Be the first to like this

Computable content: Notebooks, containers, and data-centric organizational learning

  1. 1. Computable Content: 
 Notebooks, containers, and data-centric organizational learning Domino Data Science Popup
 2017-02-22 Paco Nathan, @pacoid
 Dir, Learning Group @ O’Reilly Media
  2. 2. Project Jupyter
  3. 3. 3 Project Jupyter is the evolution of iPython notebooks, applied to a range of different programming languages and environments kernels-for-other-languages Some history…
  4. 4. 4 Download Anaconda: Activate the environment needed: source activate py3k Launch Juypter: jupyter notebook An example notebook (requires installs; see notes): Installation and launch using Anaconda
  5. 5. 5 text = ''' The titular threat of The Blob has always struck me as the ultimate movie monster: an insatiably hungry, amoeba-like mass able to penetrate virtually any safeguard, capable of--as a doomed doctor chillingly describes it--"assimilating flesh on contact. Snide comparisons to gelatin be damned, it's a concept with the most devastating of potential consequences, not unlike the grey goo scenario proposed by technological theorists fearful of artificial intelligence run rampant. ''' from textblob import TextBlob blob = TextBlob(text) print(blob.tags) print(blob.noun_phrases) Installation and launch using Anaconda
  6. 6. 6
  7. 7. 7 At its core, one can think of Jupyter as a suite 
 of network protocols: Jupyter is to the remote semantics of a REPL
 HTTP is to the remote semantics of file share A suite of network protocols
  8. 8. 8 An excellent team
  9. 9. 9 JupyterHub Jupyter in Education!forum/jupyter-education JupyterLab (alpha preview) Jupyter Kernels Projects:
  10. 10. 10 documentation discussions!forum/jupyter events Resources:
  11. 11. 11 speaking of upcoming events, stay tuned for … Resources:
  12. 12. Computable Content
  13. 13. 14 An observation…
  14. 14. 15 Jupyter @ O’Reilly Media Embracing Jupyter Notebooks at O'Reilly Learn alongside innovators, thought-by-thought, in context thought-by-thought-in-context Oriole Online Tutorials How Do You Learn?
  15. 15. 16 For example… • A unique new medium blends code, data, text, and video into a narrated learning experience with computable content • Purely browser-based UX; zero installation required • Substantially higher engagement metrics • Opens the door for live coding 
 in assessments • GitHub lists over 300K public 
 Jupyter notebooks Regex Golf by Peter Norvig with-peter-norvig
  16. 16. 17 Motivations O’Reilly needed a way for authors to use Jupyter notebooks to create professional publications. We also wanted to integrate video narration into the UX. The result is a unique new medium called Oriole: • Jupyter notebooks are used in the middleware • each viewer gets a 100% HTML experience 
 (no download/install needed) • context as a “unit of thought” • the code and video are sync’ed together • each web session has a Docker container running in the cloud
  17. 17. 18 Motivations Innovators in programming, data science, dev ops, design, etc., tend to be really busy people. Tutorials are now much quicker to publish than “traditional” books and videos. The audience gets direct, hands-on, contextualized experience across a wide variety of programming environments.
  18. 18. 19 Literate Programming, Don Knuth Paraphrased: Instead of telling computers what to do, tell other people what you want the computers to do Some history
  19. 19. 20 Wolfram Research introduced notebooks in 1988 
 for working with Mathematica… Some history
  20. 20. 21 PyCon 2016 Keynote, Lorena Barba (video) (slides) Highly recommended: speech acts (based 
 on Winograd and Flores) as theory for what 
 we’re doing here More recently
  21. 21. Notebook Practice
  22. 22. 23 • focus on a concise “unit of thought” • invest the time and editorial effort to create a good intro • keep your narrative simple and reasonably linear • “chunk” the text and code into understandable parts • alternate between text, code, output, further links, etc. • use markdown for interesting links: background, deep-dive, etc. • code cells shouldn’t be long (< 10 lines), must show output • load data+libraries from the container, not the network • clear all output then “Run All” – or it didn’t happen • video narratives: there’s text, and there’s subtext... • pause after each “beat” – smile, breathe, let people follow you Tips learned by teaching with Jupyter For the JVM people: stop thinking only about IDEs, Ivy, Maven, etc. (ibid, Knuth1984)
 (apologies for shouting)
  23. 23. 24 Jupyter notebooks + Git repos provide a low-cost, pragmatic way toward the practice of repeatable science – in this case, repeatable Data Science • executable documents • code + params + results + descriptions • shareable insights Notebooks: a cure for silos
  24. 24. 25 In data science, we see the benefits to teams for shared insights, storytelling, etc. Meanwhile domain expertise is generally more important than knowledge about tools There’s a value for developers to use notebooks in lieu of IDEs in some cases – what are those cases? GitHub now renders notebooks, so they can be used for documentation, reporting, etc. Digital Object Identifiers (DOI) can be assigned through Zenodo, making notebooks citable for academic publication “Sharing is caring”
  25. 25. Authoring & Scale-Out
  26. 26. 27
  27. 27. 28 Launchbot allows a notebook author to build a container that includes the required Jupyter kernel, installed libraries, datasets, etc. You need to have Docker installed on your laptop The backend uses Git and DockerHub to manage containers For scale, deploy to DC/OS Achieving scale
  28. 28. 29 A notebook, a container, and ~20 minutes of informal video walk into a bar...
  29. 29. O’Reilly Media conferences + training: NLP in Python
 repeated live online courses Strata
 SJ Mar 13-16
 Deep Learning sessions, 2-day training Artificial Intelligence
 NY Jun 26-29, SF Sep 17-20
 SF CFP is open, follow @OreillyAI for updates
  30. 30. speaker: periodic newsletter for updates, 
 events, conf summaries, etc.:
 @pacoid A modest proposalJust Enough Math Building Data Science Teams Hylbert-SpeysHow Do You Learn?