<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom"><title>Jupyter Blog - M Bussonnier</title><link href="https://jasongrout.github.io/medium-archive/pelican/" rel="alternate"/><link href="https://jasongrout.github.io/medium-archive/pelican/feeds/author-m-bussonnier.atom.xml" rel="self"/><id>https://jasongrout.github.io/medium-archive/pelican/</id><updated>2022-01-12T16:14:00+00:00</updated><subtitle>The Project Jupyter blog: news, releases, and community stories, archived from blog.jupyter.org.</subtitle><entry><title>Release of IPython 8.0</title><link href="https://jasongrout.github.io/medium-archive/pelican/posts/2022/release-of-ipython-8-0/" rel="alternate"/><published>2022-01-12T13:37:00+00:00</published><updated>2022-01-12T16:14:00+00:00</updated><author><name>M Bussonnier</name></author><id>tag:jasongrout.github.io,2022-01-12:/medium-archive/pelican/posts/2022/release-of-ipython-8-0/</id><summary type="html">&lt;p&gt;IPython is a powerful Python REPL that gives you tab completion, better tracebacks, multiline editing, and several useful features on top…&lt;/p&gt;
</summary><content type="html">&lt;p&gt;IPython is a powerful Python REPL that gives you tab completion, better tracebacks, multiline editing, and several useful features on top of pure Python Scripts. It is also the library that powers the Jupyter Kernel via the IPykernel.&lt;/p&gt;
&lt;p&gt;Today I am pleased to announce the release of IPython 8.0, which has been long in the making and arrived a bit over three years after the 7.0 release.&lt;/p&gt;
&lt;p&gt;I also suggest to read the &lt;a href="https://labs.quansight.org/blog/2022/01/ipython-8.0-lessons-learned-maintaining-software/"&gt;companion blog post&lt;/a&gt; on Quansight-Labs site that goes into some technical details on how we removed some old code.&lt;/p&gt;
&lt;p&gt;EDIT: You can also ask questions/comments on the jupyter &lt;a href="https://discourse.jupyter.org/t/ipython-8-0-0-out/12554"&gt;discourse&lt;/a&gt;, or &lt;a href="https://news.ycombinator.com/item?id=29906774"&gt;read the discussion on HN&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Many new features&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;This major release comes with many improvements to the existing codebase and several new features. These new features are code reformatting with Black in the CLI, ghost suggestions, and better tracebacks which highlight the error node, thus making complex expressions easier to debug (see below).&lt;/p&gt;
&lt;figure&gt;
&lt;img alt="Tracebacks now highlight in which AST node the error occurs. In complex code, this helps to quickly narrow down what causes an error. Here we also turn on xmode verbose to see values of local variables (xmode verbose is disabled by default for security reasons as it could leak secrets, but is highly recommended)" src="https://jasongrout.github.io/medium-archive/pelican/posts/2022/release-of-ipython-8-0/images/001-1_2_TYKwP_RInA4QVp9UhMhw.webp" loading="lazy" data-body-image=""&gt;
&lt;figcaption&gt;Tracebacks now highlight in which AST node the error occurs. In complex code, this helps to quickly narrow down what causes an error. Here we also turn on &lt;code&gt;xmode verbose&lt;/code&gt; to see values of local variables (xmode verbose is disabled by default for security reasons as it could leak secrets, but is highly recommended)&lt;/figcaption&gt;
&lt;/figure&gt;
&lt;p&gt;But really, if you want to read about all the new features in-depth, we recommend you spend some time &lt;a href="https://ipython.readthedocs.io/en/stable/whatsnew/version8.html#ipython-8-0"&gt;reading the what’s new&lt;/a&gt; and the list of features in &lt;code&gt;7.x&lt;/code&gt;.&lt;/p&gt;
&lt;h3 id="moving-forward-by-shedding-weight"&gt;Moving forward by shedding weight&lt;/h3&gt;
&lt;p&gt;While IPython 8.0 has many new features described in &lt;a href="https://ipython.readthedocs.io/en/stable/whatsnew/version8.html#ipython-8-0"&gt;the what’s new section&lt;/a&gt;, the majority of changes that demanded a bump in major version numbers are removals.&lt;/p&gt;
&lt;p&gt;IPython was created more than two decades ago by Fernando Pérez while procrastinating on his graduation. Even if a few lines from this period remain, it was time to remove a large number of deprecated and unused code in the IPython code base and drop old dependencies (like nose) in favor of more recent ones (pytest).&lt;/p&gt;
&lt;p&gt;Thanks to NumFOCUS &lt;a href="https://numfocus.org/programs/small-development-grants"&gt;Small Developer Grant&lt;/a&gt;, we hired &lt;a href="https://github.com/Kojoley"&gt;Nikita Kniazev (@Kojoley)&lt;/a&gt; to help us with some of the heavy lifting. Nikita did a fantastic job updating our codebase, migrating to pytest, enhancing our coverage, and fixing numerous bugs. I highly recommend contacting them if you need help with C++ and Python projects.&lt;/p&gt;
&lt;p&gt;Some of Nikita’s most notable contributions are:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;IPython is no longer reliant on Nose, which has been unmaintained for many years.&lt;/li&gt;
&lt;li&gt;Significantly increased IPython coverage.&lt;/li&gt;
&lt;li&gt;Considerable refactor of areas that were calling into deprecated features.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;On top of this, IPython 8.0 also comes with the following capabilities:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Remove most of the deprecated functions and parameters that were marked as such between IPython 1.0 and 5.0&lt;/li&gt;
&lt;li&gt;Bumped the minimal required Python version to 3.8 (following NEP 29). This means that we now use the native Python top-level async instead of crazy hacks. And we can start to use &lt;code&gt;def fun(a,/,b=None):&lt;/code&gt; syntax for positional only arguments.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Nikita also went well beyond the scope of work we gave them by suggesting more robust and often simpler code patterns.&lt;/p&gt;
&lt;p&gt;In total, this allowed us, despite all the added features, added type annotations and added tests, to decrease the size of the codebase from 37 500 LOC across 348 files to 36 100 across 294 files. We hope that this reduction in the codebase size combined with work on speeding the startup of the CLI will make IPython easier to use and contribute to.&lt;/p&gt;
&lt;p&gt;Some advice on how to do that same are on the &lt;a href="https://labs.quansight.org/blog/2022/01/ipython-8.0-lessons-learned-maintaining-software/"&gt;companion blog post&lt;/a&gt; and the Quansight-Labs site.&lt;/p&gt;
&lt;h3 id="moving-toward-pyprojecttoml"&gt;Moving toward pyproject.toml&lt;/h3&gt;
&lt;p&gt;Another place in IPython that has seen many changes in the build process. We now use &lt;code&gt;pyproject.toml&lt;/code&gt;to have a declarative build. We still require setuptools and have &lt;code&gt;setup.py&lt;/code&gt; files right now, but we are working towards removing/simplifying them soon.&lt;/p&gt;
&lt;p&gt;IPython’s wheels and sdist can now be built with &lt;code&gt;python -m build&lt;/code&gt; instead of invoking &lt;code&gt;setup.py&lt;/code&gt; directly.&lt;/p&gt;
&lt;p&gt;Our process still needs manual setup of SOURCE_DATE_EPOCH and repacking of the &lt;code&gt;sdist&lt;/code&gt; wheel to obtain &lt;a href="https://reproducible-builds.org/"&gt;reproducible builds&lt;/a&gt;. We encourage you to get the git repository, build it yourself, and get a byte-for-byte identical artifacts.&lt;/p&gt;
&lt;h3 id="monthly-release-and-following-nep-29"&gt;Monthly Release and following NEP 29&lt;/h3&gt;
&lt;p&gt;We strongly believe that predictability is key to adoption and trust in IPython. In particular, in business settings, it is critical to plan ahead while rapidly receiving bug fixes. This is why for IPython 8.0 we’ll continue to do minor monthly releases on the last Friday of each month as long at it’s reasonable and does not impact maintainers life too much.&lt;/p&gt;
&lt;p&gt;We’ll still publish a few 7.x releases with critical bug fixes, but starting last Friday of this month, you will start to see stable releases of 8.x.&lt;br&gt;
All releases are announced in &lt;a href="https://discourse.jupyter.org/tags/c/meta/8/announcement"&gt;this subcategory in discourse&lt;/a&gt;, to which you can get subscribed to get notifications.&lt;/p&gt;
&lt;p&gt;We also now follow &lt;a href="https://numpy.org/neps/nep-0029-deprecation_policy.html"&gt;NEP 29&lt;/a&gt;, meaning that IPython 8.0 is not only compatible with NumPy 1.19+ and Python 3.8+. But our future Python support schedule is predictably aligned with all other libraries following NEP 29.&lt;br&gt;
We believe the new NEP 29 is critical. It gives the core Scientific Python Ecosystem a clear schedule of available features and the removal of deprecated features.&lt;/p&gt;
&lt;h3 id="looking-forward-to-your-contributions"&gt;Looking forward to your contributions&lt;/h3&gt;
&lt;p&gt;Don’t think IPython is too hard to contribute to or has no missing features. We try to keep a list of beginner-friendly issues, but we really want your feedback and your ideas. In the meantime, have fun with this new release that you can install with :&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;pip install ipython ipykernel --upgrade
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;or&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;conda update ipython ipykernel
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;(updating ipykernel may not be necessary for you, but we recommend it).&lt;/p&gt;
&lt;h3 id="thanks"&gt;Thanks&lt;/h3&gt;
&lt;p&gt;Thanks to Tania Allard and Eric Charles for review , Quansight Labs and &lt;a href="https://www.quansight.com/"&gt;Quansight&lt;/a&gt; (my employer) for all the open-source work I can do. Of course, thanks to all the contributors to the IPython and Jupyter community, and in particular &lt;a href="https://github.com/MrMino"&gt;MrMino&lt;/a&gt; who recently joined as an IPython core dev…&lt;/p&gt;
</content><category term="IPython"/><category term="releases"/></entry><entry><title>Jupyter’s role in #ChaosDB</title><link href="https://jasongrout.github.io/medium-archive/pelican/posts/2021/jupyter-role-in-chaosdb/" rel="alternate"/><published>2021-09-01T21:43:00+00:00</published><updated>2021-09-02T06:56:00+00:00</updated><author><name>M Bussonnier</name></author><id>tag:jasongrout.github.io,2021-09-01:/medium-archive/pelican/posts/2021/jupyter-role-in-chaosdb/</id><summary type="html">&lt;p&gt;On August 26 it was revealed that a misconfiguration in Microsoft’s internal deployment of CosmosDB using Jupyter would allow attackers to…&lt;/p&gt;
</summary><content type="html">&lt;p&gt;On August 26 it &lt;a href="https://www.wiz.io/blog/chaosdb-how-we-hacked-thousands-of-azure-customers-databases"&gt;was revealed&lt;/a&gt; that a misconfiguration in Microsoft’s &lt;a href="https://msrc-blog.microsoft.com/2021/08/27/update-on-vulnerability-in-the-azure-cosmos-db-jupyter-notebook-feature/"&gt;internal deployment of CosmosDB&lt;/a&gt; using Jupyter would allow attackers to access all customer data. Fortunately, they report no evidence that customer data was compromised.&lt;/p&gt;
&lt;p&gt;Nonetheless, articles onlines, like &lt;a href="https://arstechnica.com/information-technology/2021/08/worst-cloud-vulnerability-you-can-imagine-discovered-in-microsoft-azure/"&gt;Ars Technica’s&lt;/a&gt; and &lt;a href="https://www.reuters.com/article/us-microsoft-security/researchers-cybersecurity-agency-urge-action-by-microsoft-cloud-database-users-idUSKBN2FT0K8"&gt;Reuter’s&lt;/a&gt; have strong headlines associated Jupyter, for example “Worst cloud vulnerability you can imagine.”&lt;/p&gt;
&lt;p&gt;This can be especially alarming for our community as no details on the vulnerability have been released yet, and members of our community wonder about Jupyter’s possible role in this vulnerability.&lt;/p&gt;
&lt;h2 id="what-the-jupyter-team-knows"&gt;What the Jupyter team knows&lt;/h2&gt;
&lt;p&gt;We learned about the CosmoDB vulnerability at the same time as everyone else; we had no prior notice, and received no privileged communication about this issue. We have not seen any evidence suggesting this relates to a vulnerability in Jupyter itself, as opposed to a misconfiguration of Microsoft’s internal services.&lt;/p&gt;
&lt;p&gt;We also had no prior interaction with the Microsoft team about their internal Jupyter deployment in CosmoDB.&lt;/p&gt;
&lt;p&gt;From the descriptions posted by &lt;a href="https://www.wiz.io/blog/chaosdb-how-we-hacked-thousands-of-azure-customers-databases"&gt;Wiz&lt;/a&gt; and &lt;a href="https://msrc-blog.microsoft.com/2021/08/27/update-on-vulnerability-in-the-azure-cosmos-db-jupyter-notebook-feature/"&gt;Microsoft&lt;/a&gt;, there is no suggestion of any vulnerability in Jupyter itself, and rather expect that Jupyter was used as convenient shell to exploit a vulnerability in the configuration of Microsoft’s internal services, but we have no information beyond what is publicly available to support that claim.&lt;/p&gt;
&lt;h2 id="what-are-we-doing-internally"&gt;What are we doing internally&lt;/h2&gt;
&lt;p&gt;Even if Jupyter does not have a vulnerability to fix, it is often possible for us to warn end users when risky configurations options are set. For example, if you try to login to JupyterHub over a non https connections, you will a see a warning.&lt;/p&gt;
&lt;figure&gt;
&lt;img alt="JupyterHub warning about login over unsecured HTTP" src="https://jasongrout.github.io/medium-archive/pelican/posts/2021/jupyter-role-in-chaosdb/images/001-1_v0isW10uaM0t1DyKOIL02Q.webp" loading="lazy" data-body-image=""&gt;
&lt;figcaption&gt;JupyterHub warning about login over unsecured HTTP&lt;/figcaption&gt;
&lt;/figure&gt;
&lt;p&gt;We are preparing for the full information release of #ChaosDB details, to see if there are any relevant safeguards and warnings to implement on the Jupyter side. We are also trying to reach the involved Microsoft Security Team personally to know whether there are steps we can take before public disclosure.&lt;/p&gt;
&lt;p&gt;In the meantime you can contribute and get involved:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;The security working group meets &lt;a href="https://jupyter.readthedocs.io/en/latest/community/content-community.html"&gt;every other Friday&lt;/a&gt;. You can follow and open issues the repository &lt;a href="https://github.com/jupyter/security"&gt;for public questions and meeting minutes&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;You can send your questions and concerns about security to &lt;a href="mailto:security@ipython.org"&gt;security@ipython.org&lt;/a&gt; to reach out to our security team.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;We always welcome feedback, questions, and help regarding security in Jupyter.&lt;/p&gt;
</content><category term="security"/></entry><entry><title>CVE-2021–32797 and CVE-2021–32798 Remote Code execution in JupyterLab and Jupyter Notebook</title><link href="https://jasongrout.github.io/medium-archive/pelican/posts/2021/cve-2021-32797-and-cve-2021-32798-remote-code-execution/" rel="alternate"/><published>2021-08-09T20:05:00+00:00</published><updated>2021-08-09T20:19:00+00:00</updated><author><name>M Bussonnier</name></author><id>tag:jasongrout.github.io,2021-08-09:/medium-archive/pelican/posts/2021/cve-2021-32797-and-cve-2021-32798-remote-code-execution/</id><summary type="html">&lt;p&gt;TL:DR; All recent JupyterLab and Notebook versions are susceptible to a attack where a maliciously crafted notebook can trigger arbitrary…&lt;/p&gt;
</summary><content type="html">&lt;p&gt;TL:DR; All recent JupyterLab and Notebook versions are susceptible to a attack where a maliciously crafted notebook can trigger arbitrary code execution when a user views these malicious files.&lt;/p&gt;
&lt;p&gt;We strongly advise all users to deploy the new version of JupyterLab and Jupyter Notebook.&lt;/p&gt;
&lt;p&gt;Jupyter Notebook 6.4.1 or above, 5.7.11 or above.&lt;/p&gt;
&lt;p&gt;Jupyter Lab 3.1.4 or above, 3.0.17 or above, 2.3.2 or above, 2.2.10 or above , 1.2.21 or above&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;This blog post will be updated with links to the various patches, exploit and disclosure later once the final links are available&lt;/strong&gt;.&lt;/p&gt;
&lt;hr&gt;
&lt;h2 id="jupyter-security-model"&gt;Jupyter Security Model&lt;/h2&gt;
&lt;p&gt;Jupyter Notebook act as a REPL (Read Eval Print Loop) in a browser, our main goal is to expose as many functionalities to our users, with the least restrictions. We also want users to be able to share their results with other, and let everyone be capable of reproducing the result.&lt;/p&gt;
&lt;p&gt;When receiving an untrusted notebook from a potentially malicious source we still want users to be able to inspect a notebook without risks, our approach is that an untrusted notebook has restrictive capabilities until all cells have been manually inspected and explicitly run by a user, or the notebook is explicitly marked as trusted. If one finds a way to bypass this trust mechanism, a notebook might be able to execute code in the browser at at a time where a user is not expecting execution to occur.&lt;/p&gt;
&lt;p&gt;This is what happen in these particular CVEs, where some content of a notebook were improperly handled.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;[This part of the blog post will be updated with links to actual reports, and proof of concept once the patched version have reached enough package repositories]&lt;/strong&gt;&lt;/p&gt;
&lt;h2 id="cve-timeline"&gt;&lt;strong&gt;CVE Timeline&lt;/strong&gt;&lt;/h2&gt;
&lt;p&gt;We want to thanks Guillaume Jeanne (Google), and Timo Schmid (Google) for the vulnerability report and helping us through the fixing process.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Thursday, 15 Jul 2021 07:11:13 -0700 (PDT): Initial question about security issue disclosure on security@ipython.org (no specific on the vulnerability)&lt;/li&gt;
&lt;li&gt;Tuesday, 20 Jul 2021 05:52:09 -0700 (PDT): Actual Vulnerability Report.&lt;/li&gt;
&lt;li&gt;Tuesday, 20 Jul 2021 : Open relevant GitHub security advisory on &lt;a href="https://github.com/jupyter/notebook/security/advisories/GHSA-hwvq-6gjx-j797"&gt;Notebook&lt;/a&gt; and &lt;a href="https://github.com/jupyterlab/jupyterlab/security/advisories/GHSA-4952-p58q-6crx"&gt;JupyterLab&lt;/a&gt; Repositories&lt;/li&gt;
&lt;li&gt;Thursday, 5 August 2021 : First releases with patched version on PyPI.&lt;/li&gt;
&lt;li&gt;Monday, 9 August : publication of this blog post and publish security advisory on GitHub.&lt;/li&gt;
&lt;li&gt;[Further item may be added to list publication by downstream repositories, like conda, conda-forge, debian…, contact us to add an item]&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="what-we-learned"&gt;&lt;strong&gt;What we learned&lt;/strong&gt;&lt;/h2&gt;
&lt;p&gt;Dealing with Security vulnerability in Jupyter and more generally in Open-Source is far from easy. We initially thought about treating the Notebook and Lab CVE separately but they are/were too similar and the cross discussion too revealing to treat both independently.&lt;/p&gt;
&lt;p&gt;As Jupyter is mostly a volunteer based organisation, there is often no contributor responsible to replying to security issues, and when someone steps up they might not be a expert, nor available all the time. I want to give special thanks to &lt;a href="https://github.com/blink1073"&gt;Steve Silvester&lt;/a&gt; (Apple) , &lt;a href="https://github.com/afshin"&gt;Afshin Darian&lt;/a&gt; (Two Sigma), and &lt;a href="https://github.com/Zsailer"&gt;Zach Sailer&lt;/a&gt; (Apple), and &lt;a href="https://github.com/Carreau"&gt;Matthias Bussonnier&lt;/a&gt; (Quansight) for writing the fixes, planning through the release and notifying stakeholders.&lt;/p&gt;
&lt;p&gt;Advance notice to stakeholder is complicated, we know of a few large deployment and have personal connections to a couple organisation, and were able to reached out to let them know critical release would be published. There is an inherent tension between publicly warning our user base that security release would be published, which might push malicious actor to closely survey the codebase changes and re-derive the attack vectors, and publishing the release first, with the details later. Especially since we are trying to be transparent in our communication, security fixes are the opposite of our normal communication workflow.&lt;/p&gt;
&lt;p&gt;Our communication process is imperfect. We have 2 mailing list for security-related discussion. The first one – security@ipython.org – has only a couple of members all core contributors and can receive email from the outside, it is used for triage. It receive a high number of spam as this is public email. As it has only a few members and we are all busy, mail can slip through. The second mailing list is slightly larger, and used for internal announcement for stakeholder. It has a fairly open membership model, (ask a Jupyter developer if you can be on it, and the reason why and we’ll likely add you), though it’s content seem to be ignored (it even lands on my spam folder, not sure why).&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;What we’ll do better&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;In order to attempt to better react and be proactive with respect to security we &lt;a href="https://github.com/jupyter/governance/issues/111"&gt;are&lt;/a&gt; attempting &lt;a href="https://discourse.jupyter.org/t/project-jupyter-security-subproject/10175/6"&gt;to form&lt;/a&gt; and new &lt;a href="https://github.com/jupyter/security"&gt;security-focused&lt;/a&gt; subproject/workgroup to educate and have procedure for everything security related. We welcome your involvement and feedback in how to improve Jupyter security and how to better involve the community.&lt;/p&gt;
</content><category term="Jupyter Notebook"/><category term="JupyterLab"/><category term="releases"/><category term="security"/></entry><entry><title>IPython 7.0, Async REPL</title><link href="https://jasongrout.github.io/medium-archive/pelican/posts/2018/ipython-7-0-async-repl/" rel="alternate"/><published>2018-09-27T17:41:00+00:00</published><updated>2018-09-27T17:41:00+00:00</updated><author><name>M Bussonnier</name></author><id>tag:jasongrout.github.io,2018-09-27:/medium-archive/pelican/posts/2018/ipython-7-0-async-repl/</id><summary type="html">&lt;p&gt;Today we are pleased to announce the release of IPython 7.0, the powerful Python interactive shell that goes above and beyond the default…&lt;/p&gt;
</summary><content type="html">&lt;p&gt;Today we are pleased to announce the release of &lt;a href="https://ipython.readthedocs.io/"&gt;IPython 7.0, the powerful Python interactive shell&lt;/a&gt; that goes above and beyond the default Python REPL with advanced tab completion, syntactic coloration, and more. It’s the jupyter kernel for python used by millions of users, hopefully including you. This is the second major release of IPython since we stopped support for Python 2.&lt;/p&gt;
&lt;p&gt;Not having to support Python 2 allowed us to make full use of new Python 3 features and bring never before seen capability in a Python Console. We are still encouraging library authors and users to look at the &lt;a href="https://python3statement.org/"&gt;Python 3 Statement&lt;/a&gt; to learn about the end of life of Python 2 and how to stop support for Python 2 &lt;strong&gt;without breaking installation for Python 2 end users&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;As developers and maintainers of IPython, it was a large gain of time to be able to only develop for a single version of python. Avoiding the use of conditional imports, being able to rely on type annotations, and make use of the newly available Python APIs were some of the advantages that made us more productive. Especially as most of the work on IPython is done by volunteers who work on nights and weekends, with only a couple of minutes here and there, this often made the difference between a patch reaching completion, or the contributor moving on to other pastures.&lt;/p&gt;
&lt;p&gt;One of the core features we focused on for this release is the ability to (ab)use the &lt;em&gt;async&lt;/em&gt; and &lt;em&gt;await&lt;/em&gt; syntax available in Python 3.5+. There are of course many other improvements in this release you can read about in the &lt;a href="https://ipython.readthedocs.io/en/stable/whatsnew/index.html"&gt;what’s new&lt;/a&gt;.&lt;/p&gt;
&lt;figure&gt;
&lt;img alt="Demo of awaiting coroutine in IPython 7.0" src="https://jasongrout.github.io/medium-archive/pelican/posts/2018/ipython-7-0-async-repl/images/001-1_b4zaYTEIjve8x2-BlaPmNQ.mp4" loading="lazy" data-body-image=""&gt;
&lt;figcaption&gt;Demo of awaiting coroutine in IPython 7.0&lt;/figcaption&gt;
&lt;/figure&gt;
&lt;p&gt;TL;DR: You can now use &lt;em&gt;async&lt;/em&gt;/&lt;em&gt;await&lt;/em&gt; at the top level in the IPython terminal and in the notebook, it should — in most of the cases — “just work”. Update IPython to version 7+, IPykernel to version 5+, and you’re off to the races.&lt;/p&gt;
&lt;p&gt;See how to &lt;strong&gt;install IPython by reading the “&lt;/strong&gt;&lt;a href="https://ipython.readthedocs.io/en/stable/whatsnew/index.html"&gt;&lt;strong&gt;what’s new&lt;/strong&gt;&lt;/a&gt;”.&lt;/p&gt;
&lt;p&gt;The recipes are currently building on conda-forge and should be available soon. For the time being you can install it via pip:&lt;/p&gt;
&lt;p&gt;&lt;code&gt;$ pip install ipython ipykernel --upgrade&lt;/code&gt;&lt;/p&gt;
&lt;h3 id="a-primer-on-concurrency"&gt;A Primer on concurrency&lt;/h3&gt;
&lt;p&gt;You may have heard about &lt;em&gt;async&lt;/em&gt;/&lt;em&gt;await&lt;/em&gt;, threads, concurrency, preemptive scheduling and cooperative scheduling without really understanding what all this is about. If you are not familiar will all the above terms, all the hype may be confusing so let’s talk about concurrency in a really high level way.&lt;/p&gt;
&lt;p&gt;Typically when your computer needs to execute many tasks, it will switch between them really fast, so from the human point of view it looks like everything is being processed at the same time. There are two main ways of doing so under the hood: &lt;em&gt;Preemptive&lt;/em&gt; Scheduling, and &lt;em&gt;Cooperative&lt;/em&gt; Scheduling.&lt;/p&gt;
&lt;p&gt;With preemptive scheduling changing tasks can happen &lt;strong&gt;at any time&lt;/strong&gt;. For example, while writing this blog post, I could stop in the middle of a word to start writing an email, which will itself be interrupted to check Gitter/Slack, before coming back, writing 5 words and stopping to get dinner.&lt;/p&gt;
&lt;figure&gt;
&lt;img alt="TL;DR: Concurrency (from Geek And Poke, 2009)" src="https://jasongrout.github.io/medium-archive/pelican/posts/2018/ipython-7-0-async-repl/images/002-1_Ewlg0l4stoFZ_fQUtKffNg.jpeg" loading="lazy" data-body-image=""&gt;
&lt;figcaption&gt;TL;DR: Concurrency (from &lt;a href="http://geek-and-poke.com/geekandpoke/2012/9/3/simply-explained.html"&gt;Geek And Poke&lt;/a&gt;, 2009)&lt;/figcaption&gt;
&lt;/figure&gt;
&lt;p&gt;With &lt;em&gt;cooperative&lt;/em&gt; scheduling, the task switches can happen &lt;strong&gt;only at agreed spots&lt;/strong&gt;. The term co-operative comes from the fact that tasks need to co-operate for the whole process to function. If a task decides to never take a break to let you to do something else, the illusion of many tasks being completed at once disappears.&lt;/p&gt;
&lt;p&gt;Each approach has its own advantages and drawbacks, and we will not focus on these. Let’s just say that with co-operative scheduling &lt;em&gt;async&lt;/em&gt;/&lt;em&gt;await&lt;/em&gt; let you mark the areas where interruption is allowed to occur.&lt;/p&gt;
&lt;p&gt;Moreover, &lt;em&gt;async&lt;/em&gt;/&lt;em&gt;await&lt;/em&gt; syntax allows cooperative scheduling in Python in a way that lets you write code that &lt;em&gt;looks&lt;/em&gt; synchronous (without task switches), while actually being able to be interrupted, from the point of view of the computer. It also keeps the programmers from having to worry about global state changing under their feet, as this can occur &lt;em&gt;only&lt;/em&gt; at the proximity of &lt;code&gt;await&lt;/code&gt; keywords.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;When going to a restaurant, social conventions (and common sense) tell us when and how these interactions can or cannot be interrupted, but programming languages need markers when using cooperative scheduling. These are &lt;/code&gt;async&lt;code&gt;and&lt;/code&gt;await&lt;code&gt;keywords in Python.&lt;/code&gt;Async&lt;code&gt;marks a function that *may* be interrupted,&lt;/code&gt;await&lt;code&gt;is required to call async-functions (aka&lt;/code&gt;coroutine`) and marks a point were task can be switched.&lt;/p&gt;
&lt;p&gt;If you want to learn more we strongly recommend reading the &lt;a href="https://trio.readthedocs.io/en/latest/tutorial.html"&gt;Trio Tutorial Primer on async programming&lt;/a&gt;.&lt;/p&gt;
&lt;h2 id="async-in-the-python-world"&gt;&lt;strong&gt;Async in the Python world&lt;/strong&gt;&lt;/h2&gt;
&lt;p&gt;In the current Python ecosystem, packages tend to standardize around &lt;a href="https://docs.python.org/3/library/asyncio.html"&gt;AsyncIO&lt;/a&gt;, provided in the Python standard library. AsyncIO can sometimes be judged as &lt;a href="https://whatisjasongoldstein.com/writing/im-too-stupid-for-asyncio/"&gt;complex&lt;/a&gt; even by &lt;a href="http://lucumr.pocoo.org/2016/10/30/i-dont-understand-asyncio/"&gt;well known developers&lt;/a&gt;; this is in part due to the necessity of supporting other older asynchronous projects like &lt;a href="https://twistedmatrix.com/trac/"&gt;twisted&lt;/a&gt; or &lt;a href="http://www.tornadoweb.org/en/stable/"&gt;tornado&lt;/a&gt;, but it’s also what makes a lots of its power: One event loop to rule them all.&lt;/p&gt;
&lt;p&gt;Running a single async task requires you to learn about AsyncIO, write a non negligible amount of boilerplate code in order to fetch a single result. This can be especially cumbersome when doing interactive exploration, and likely will keep users from experimenting with AsyncIO code.&lt;/p&gt;
&lt;figure&gt;
&lt;img alt="How to run a single async task in Python repl without async integration." src="https://jasongrout.github.io/medium-archive/pelican/posts/2018/ipython-7-0-async-repl/images/003-1_9PXwxCxpLs4BGcR0koHOww.webp" loading="lazy" data-body-image=""&gt;
&lt;figcaption&gt;How to run a single async task in Python repl without async integration.&lt;/figcaption&gt;
&lt;/figure&gt;
&lt;p&gt;As Raymond Hettinger would says (slamming hand on podium): “There must be a better way”.&lt;/p&gt;
&lt;h2 id="ipython-asyncio-integration"&gt;IPython AsyncIO Integration&lt;/h2&gt;
&lt;p&gt;Thanks to a multiple month effort (actually this work started close to &lt;a href="https://github.com/ipython/ipython/pull/10390"&gt;2 years ago&lt;/a&gt;), and the work of many talented people, you can now directly await code in the REPL and IPython will do “the right thing”.&lt;/p&gt;
&lt;figure&gt;
&lt;img alt="Awaiting AsyncIO code should now automagically work." src="https://jasongrout.github.io/medium-archive/pelican/posts/2018/ipython-7-0-async-repl/images/004-1_I3tXhrFw1SJYMmm3nghj0Q.webp" loading="lazy" data-body-image=""&gt;
&lt;figcaption&gt;Awaiting AsyncIO code should now automagically work.&lt;/figcaption&gt;
&lt;/figure&gt;
&lt;p&gt;With the new integration, you don’t have to import or learn about asyncio, deal with the loop yourself, or wrap your task in its own function. You are now able to just focus on the business logic and move along.&lt;/p&gt;
&lt;p&gt;The only thing you need to remember is: &lt;em&gt;&lt;strong&gt;If it is an async function you need to await it.&lt;/strong&gt;&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;We hope that this will free users to experiment and play with asynchronous programming. Of course this will not magically make your code faster, or run in parallel, simply easier to write and reason about.&lt;/p&gt;
&lt;h2 id="other-async-libraries-aka-curio-and-trio-integration"&gt;Other Async Libraries (aka: curio and trio integration)&lt;/h2&gt;
&lt;p&gt;The addition of &lt;code&gt;async&lt;/code&gt; and &lt;code&gt;await&lt;/code&gt; keyword in Python did not only simplify the use of asynchronous programing and the standardization around &lt;code&gt;asyncio&lt;/code&gt;; it also allowed experimentation with new paradigms for asynchronous libraries. David Beazley created &lt;a href="https://github.com/dabeaz/curio"&gt;Curio&lt;/a&gt;, and Nathaniel Smith &lt;a href="https://trio.readthedocs.io/en/latest/"&gt;Trio&lt;/a&gt;, which both explore new ways to write asynchronous programs and explore how &lt;code&gt;async&lt;/code&gt;, &lt;code&gt;await&lt;/code&gt; and &lt;em&gt;coroutines&lt;/em&gt; could be used when starting from a blank slate. The Trio &lt;a href="https://trio.readthedocs.io/en/latest/"&gt;documentation introduction&lt;/a&gt; and which problems it attempt to solve [&lt;a href="https://vorpus.org/blog/some-thoughts-on-asynchronous-api-design-in-a-post-asyncawait-world/"&gt;1&lt;/a&gt;, &lt;a href="https://vorpus.org/blog/announcing-trio/"&gt;2&lt;/a&gt;, &lt;a href="https://vorpus.org/blog/control-c-handling-in-python-and-trio/"&gt;3&lt;/a&gt;, &lt;a href="https://vorpus.org/blog/timeouts-and-cancellation-for-humans/"&gt;4&lt;/a&gt;, &lt;a href="https://vorpus.org/blog/notes-on-structured-concurrency-or-go-statement-considered-harmful/"&gt;5&lt;/a&gt;, &lt;a href="https://vorpus.org/blog/companion-post-for-my-pycon-2018-talk-on-async-concurrency-using-trio/"&gt;6&lt;/a&gt;] are highly recommended reading with varying level of technicality.&lt;/p&gt;
&lt;p&gt;Interactive uses of libraries is key to getting insight and intuition on how a system works, intuition is critical to rapid prototyping, development and creation of higher levels of abstraction. It was natural for us to build support for Curio, Trio, (and potentially new other async libraries) into IPython.&lt;/p&gt;
&lt;p&gt;You can setup IPython to run async code via Curio, or Trio and experiment or write production code using these libraries. To do so use the &lt;code&gt;%autoawait&lt;/code&gt; magic, and tell it which library to use.&lt;/p&gt;
&lt;figure&gt;
&lt;img alt="Defining an asynchronous function and spawning multiple concurrent task in IPython using Trio." src="https://jasongrout.github.io/medium-archive/pelican/posts/2018/ipython-7-0-async-repl/images/005-1_LBoQBdKymSQYv_k1Yb1jAg.webp" loading="lazy" data-body-image=""&gt;
&lt;figcaption&gt;Defining an asynchronous function and spawning multiple concurrent task in IPython using Trio.&lt;/figcaption&gt;
&lt;/figure&gt;
&lt;p&gt;As you can see code looks really natural, and it is easy to forget that the above snippet is usually a syntax error in Python or older version of IPython. The astute reader and IPython expert will have suggested to use the &lt;em&gt;%%time&lt;/em&gt; cell magic instead of doing it manually, though a couple of magics still need updates to properly handle async code. We look forward to your contribution on this front, and are excited to see what you can come up with.&lt;/p&gt;
&lt;h2 id="async-in-notebooks-and-other-jupyter-clients"&gt;Async in Notebooks (and other Jupyter Clients)&lt;/h2&gt;
&lt;p&gt;If you are a Jupyter user, you most likely use a Notebook interface, and interact with IPython via the ipykernel package.&lt;/p&gt;
&lt;figure&gt;
&lt;img alt="Using AsyncIO in nteract desktop works out of the box with newer IPython and IPykernel" src="https://jasongrout.github.io/medium-archive/pelican/posts/2018/ipython-7-0-async-repl/images/006-1_aJEDRVPyMtyaiDQGXsx6-w.webp" loading="lazy" data-body-image=""&gt;
&lt;figcaption&gt;Using AsyncIO in &lt;a href="https://nteract.io/"&gt;nteract desktop&lt;/a&gt; works out of the box with newer IPython and IPykernel&lt;/figcaption&gt;
&lt;/figure&gt;
&lt;p&gt;We’ve been working hard on making &lt;em&gt;async&lt;/em&gt; code work in a notebook when using ipykernel. While most of the heavy lifting was done in IPython, the work in IPykernel was non-negligible, and required the accommodation of a number of use cases, which are not working. You now have to &lt;strong&gt;update&lt;/strong&gt; both &lt;strong&gt;IPython&lt;/strong&gt; to 7.0+ &lt;strong&gt;and ipykernel&lt;/strong&gt; to version 5.0+ for async to be available. If you are using pip: &lt;code&gt;$ pip install IPython ipykernel --update&lt;/code&gt;. As for conda, the packages should be available on &lt;a href="https://conda-forge.org/"&gt;conda-forge&lt;/a&gt; soon. With these new releases, &lt;code&gt;async&lt;/code&gt; will work with all the frontends that support the Jupyter Protocol, including the classic Notebook, JupyterLab, Hydrogen, nteract desktop, and &lt;a href="https://blog.nteract.io/nteract-on-jupyter-53cc2c38290d"&gt;nteract web&lt;/a&gt;. The default code will run in the existing asyncio/tornado loop that runs the kernel. Integration with Trio and Curio is still available, but tasks will not be interleaved with the asyncio one — at least not yet. We welcome work on this front.&lt;/p&gt;
&lt;p&gt;Submitting background tasks still requires you to access the asyncio event loop, and we are still be looking for contributions on this front as well, to make it even easier to run async code.&lt;/p&gt;
&lt;p&gt;There are still some question on how to handle nested asyncio eventloop. It is indeed usually impossible to run nested eventloop, in the case of &lt;code&gt;asyncio&lt;/code&gt;, trying to do so raises a &lt;code&gt;RuntimeError&lt;/code&gt; the kernel already ran in and asyncio eventloop, calling directly or indirectly &lt;code&gt;loop.run_until_complete&lt;/code&gt; and alike is not possible. There are discussions to use libraries like &lt;code&gt;nest_asyncio&lt;/code&gt; as pointed out on &lt;a href="https://github.com/jupyter/notebook/issues/3397#issuecomment-419386811"&gt;this comment&lt;/a&gt;, but until those are more battle tested we do not want to commit a default solution in the core of IPython and let the ecosystem develop.&lt;/p&gt;
&lt;h2 id="future-improvements"&gt;Future improvements&lt;/h2&gt;
&lt;p&gt;As far as we know, this is the first Async-aware Python REPL, and libraries like Trio/Curio are still young, thus there are still a number of use-cases we have not yet even thought about! We are encouraging you to come forward to talk about your use cases, what you tried and what did not work. There is also a number of new features to implement (making magics work with &lt;code&gt;async&lt;/code&gt;, tab completion, background tasks) on which we would welcome new contributors.&lt;/p&gt;
</content><category term="IPython"/><category term="releases"/></entry><entry><title>I Python, You R, We Julia</title><link href="https://jasongrout.github.io/medium-archive/pelican/posts/2018/i-python-you-r-we-julia/" rel="alternate"/><published>2018-05-29T16:11:00+00:00</published><updated>2018-05-29T16:11:00+00:00</updated><author><name>M Bussonnier</name></author><id>tag:jasongrout.github.io,2018-05-29:/medium-archive/pelican/posts/2018/i-python-you-r-we-julia/</id><summary type="html">&lt;p&gt;When we decided to rename part of the IPython project to Jupyter in 2014, we had many good reasons. Our goal was to make (Data)Science and…&lt;/p&gt;
</summary><content type="html">&lt;p&gt;When we decided to rename part of the IPython project to Jupyter in 2014, we had many good reasons. Our goal was to make (Data)Science and Education better, by providing Free and Open-Source tools that can be used by everyone. The name “Jupyter” is a strong reference to Galileo, who detailed his discovery of the Moons of Jupiter in &lt;a href="http://www.dioi.org/galileo/scans.pdf"&gt;his astronomical notebooks&lt;/a&gt;. The name is also a play on the languages Julia, Python, and R, which are pillars of the modern scientific world. While we ❤️🐍(Love Python), and use it for much of the architecture in Jupyter, we believe that all open-source languages have an important role in scientific and data analysis workflows. We have strived to make Jupyter a platform that treats all open-source languages as first-class citizens.&lt;/p&gt;
&lt;p&gt;You may know that Jupyter has &lt;a href="https://github.com/jupyter/jupyter/wiki/Jupyter-kernels"&gt;several dozen kernels&lt;/a&gt; in as many languages, and that you can choose any of them to power the code execution in a single notebook. However, the possibilities for cross-language integration go way beyond this, which I’ll attempt to demonstrate here.&lt;/p&gt;
&lt;p&gt;What I’ll describe below has been possible for now several years – from even before the name Jupyter was first mentioned. It relies on the work of many Open Source libraries, too many to cite all the authors. It is not the only solution — neither the first, not the last. RStudio recently &lt;a href="http://blog.rstudio.com/2018/03/26/reticulate-r-interface-to-python/"&gt;blogged about reticulate&lt;/a&gt;, which allows you to intertwine Python and R code. &lt;a href="http://beakerx.com/"&gt;BeakerX&lt;/a&gt; is also another solution that appears to to support many languages.&lt;/p&gt;
&lt;p&gt;We hope that showing how multiple languages can be use together will help make you more efficient in your work, and that it promotes cooperation across our communities to use the strengths of each language. This article only scratches the surface, you can read more in depth what you can do and how this works in &lt;a href="https://matthiasbussonnier.com/posts/23-Cross-Language-Integration.html"&gt;a notebook&lt;/a&gt; I wrote some time ago.&lt;/p&gt;
&lt;h2 id="follow-along-on-binder"&gt;Follow along on Binder&lt;/h2&gt;
&lt;p&gt;We created Jupyter and Binder to make science more trustworthy and allow results to be replicate. If you doubt what I have written below, or just want to follow along feel free to &lt;a href="https://mybinder.org/v2/gh/binder-examples/multi-language-demo/master"&gt;try on your own using Binder&lt;/a&gt; — the docker image is quite big so can take a while to launch. In the linked notebook we show a couple of extra languages.&lt;/p&gt;
&lt;h2 id="the-tail-of-fibonacci"&gt;The Tail of Fibonacci&lt;/h2&gt;
&lt;p&gt;A famous example of recursion in Computer Science is the Fibonacci series, its ubiquity allows the reader not to focus on the sequence itself but on the environment around it. As a reminder, the &lt;code&gt;Fib&lt;/code&gt; sequence is defined with its first two terms being one, then each subsequent term as the sum of the two preceding terms; i.e F(1)= 1, F(2)=1, F(n) = F(n-1)+F(n-2)&lt;/p&gt;
&lt;p&gt;We can calculate the first few terms: 1, 1, 2, 3, 5, 8 … note that F(5) is a fixed point F(5) = 5, and trust that asymptotically the sequence &lt;a href="https://en.wikipedia.org/wiki/Fibonacci_number"&gt;behaves like exp(n)&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Let’s see how one can use many languages to play with fibonacci.&lt;/p&gt;
&lt;h3 id="i-python"&gt;I, Python&lt;/h3&gt;
&lt;p&gt;For this exploration we’ll start with Python. It is my language of choice, the one I’m the most familiar with:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="nx"&gt;def&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;fib&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;n&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="s"&gt;&amp;quot;&amp;quot;&amp;quot;&lt;/span&gt;
&lt;span class="s"&gt;    A simple definition of fibonacci manually unrolled&lt;/span&gt;
&lt;span class="s"&gt;    &amp;quot;&amp;quot;&amp;quot;&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="k"&gt;if&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;n&lt;/span&gt;&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
&lt;span class="w"&gt;        &lt;/span&gt;&lt;span class="k"&gt;return&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="nx"&gt;x&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="nx"&gt;y&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="k"&gt;for&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;i&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="k"&gt;in&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;range&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;n&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
&lt;span class="w"&gt;        &lt;/span&gt;&lt;span class="nx"&gt;x&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="nx"&gt;y&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;y&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="nx"&gt;x&lt;/span&gt;&lt;span class="o"&gt;+&lt;/span&gt;&lt;span class="nx"&gt;y&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="k"&gt;return&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;y&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;We can check that the fib function works correctly.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="o"&gt;&amp;gt;&amp;gt;&amp;gt;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;[&lt;span class="nv"&gt;fib&lt;/span&gt;&lt;span class="ss"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;i&lt;/span&gt;&lt;span class="ss"&gt;)&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="k"&gt;for&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nv"&gt;i&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nv"&gt;in&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nv"&gt;range&lt;/span&gt;&lt;span class="ss"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;,&lt;span class="mi"&gt;10&lt;/span&gt;&lt;span class="ss"&gt;)&lt;/span&gt;]
[&lt;span class="mi"&gt;1&lt;/span&gt;,&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;,&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;2&lt;/span&gt;,&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;3&lt;/span&gt;,&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;5&lt;/span&gt;,&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;8&lt;/span&gt;,&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;13&lt;/span&gt;,&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;21&lt;/span&gt;,&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;34&lt;/span&gt;]
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;And plot it:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="o"&gt;%&lt;/span&gt;&lt;span class="n"&gt;matplotlib&lt;/span&gt; &lt;span class="n"&gt;inline&lt;/span&gt;
&lt;span class="kn"&gt;import&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nn"&gt;numpy&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="k"&gt;as&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nn"&gt;np&lt;/span&gt;
&lt;span class="n"&gt;X&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;np&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="kp"&gt;arange&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="mi"&gt;30&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="n"&gt;Y&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;np&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="kp"&gt;array&lt;/span&gt;&lt;span class="p"&gt;([&lt;/span&gt;&lt;span class="n"&gt;fib&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;x&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;x&lt;/span&gt; &lt;span class="ow"&gt;in&lt;/span&gt; &lt;span class="n"&gt;X&lt;/span&gt;&lt;span class="p"&gt;])&lt;/span&gt;
&lt;span class="kn"&gt;import&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nn"&gt;matplotlib.pyplot&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="k"&gt;as&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nn"&gt;plt&lt;/span&gt;
&lt;span class="n"&gt;fig&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;ax&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;plt&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;subplots&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
&lt;span class="n"&gt;ax&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;scatter&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;X&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;Y&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="n"&gt;ax&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;set&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;xlabel&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s1"&gt;&amp;#39;n&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;ylabel&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s1"&gt;&amp;#39;fib(n)&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
       &lt;span class="n"&gt;title&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s1"&gt;&amp;#39;The Fibonacci sequence grows fast !&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;&lt;img src="https://jasongrout.github.io/medium-archive/pelican/posts/2018/i-python-you-r-we-julia/images/001-1_kuI3VeevOugILzLW9whmXg.webp" alt="" loading="lazy" data-body-image=""&gt;&lt;/p&gt;
&lt;p&gt;As you can see it grows quite quickly, actually it’s exponential. Now let’s see how we can check this exponential behavior using multi-language integration.&lt;/p&gt;
&lt;h2 id="you-r"&gt;You R&lt;/h2&gt;
&lt;p&gt;With the fantastic &lt;code&gt;RPy2&lt;/code&gt; package, we can integrate code seamlessly between Python and R, allowing you to send data back and forth between the two languages. &lt;code&gt;RPy2&lt;/code&gt; will translate R data structures to Python and NumPy, and vice versa.&lt;/p&gt;
&lt;p&gt;In addition, &lt;code&gt;RPy2&lt;/code&gt; has extra integration with &lt;code&gt;IPython&lt;/code&gt; and provides “Magics” to write inline or multiline R code. Loading the RPy2 extension exposes the &lt;code&gt;%R&lt;/code&gt; , &lt;code&gt;%%R&lt;/code&gt;, &lt;code&gt;%Rpush&lt;/code&gt; and &lt;code&gt;%%Rpull&lt;/code&gt; commands for writing R.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="nf"&gt;%load_ext&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;rpy2&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;ipython&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;We can use &lt;code&gt;%RPush&lt;/code&gt; to send data to a stateful R process.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="c"&gt;%Rpush Y X&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;and use &lt;code&gt;%%R&lt;/code&gt; in order to instruct the R process to run an R cell.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="c"&gt;%%R&lt;/span&gt;
&lt;span class="n"&gt;my_summary&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nb"&gt;summary&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;lm&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nb"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;Y&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="o"&gt;~&lt;/span&gt;&lt;span class="n"&gt;X&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt;
&lt;span class="n"&gt;val&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;&amp;lt;-&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;my_summary&lt;/span&gt;$&lt;span class="n"&gt;coefficients&lt;/span&gt;

&lt;span class="nb"&gt;plot&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;X&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nb"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;Y&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt;
&lt;span class="n"&gt;abline&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;my_summary&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;Here we make a linear regression model on log(Y) vs X. As Y is (hopefully) exponential, we should get a nice line. &lt;code&gt;RPy2&lt;/code&gt; provides rich display integration which will nicely display outputs and plots inline in a notebook:&lt;/p&gt;
&lt;p&gt;&lt;img src="https://jasongrout.github.io/medium-archive/pelican/posts/2018/i-python-you-r-we-julia/images/002-1__BB9dGXvVueX5kiEiq9A2A.webp" alt="" loading="lazy" data-body-image=""&gt;&lt;/p&gt;
&lt;p&gt;We can of course ask for the linear regression summary:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="c"&gt;%%R&lt;/span&gt;
&lt;span class="n"&gt;my_summary&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;Which outputs:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="n"&gt;Call&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;
&lt;span class="n"&gt;lm&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="n"&gt;formula&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;log&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="n"&gt;Y&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;~&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;X&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt;

&lt;span class="n"&gt;Residuals&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;
&lt;span class="w"&gt;      &lt;/span&gt;&lt;span class="n"&gt;Min&lt;/span&gt;&lt;span class="w"&gt;        &lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="n"&gt;Q&lt;/span&gt;&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="n"&gt;Median&lt;/span&gt;&lt;span class="w"&gt;        &lt;/span&gt;&lt;span class="mi"&gt;3&lt;/span&gt;&lt;span class="n"&gt;Q&lt;/span&gt;&lt;span class="w"&gt;       &lt;/span&gt;&lt;span class="n"&gt;Max&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;
&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="mf"&gt;0.183663&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="mf"&gt;0.013497&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="mf"&gt;0.004137&lt;/span&gt;&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="mf"&gt;0.006046&lt;/span&gt;&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="mf"&gt;0.296094&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;

&lt;span class="n"&gt;Coefficients&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;
&lt;span class="w"&gt;             &lt;/span&gt;&lt;span class="n"&gt;Estimate&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;Std&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;Error&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;t&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;value&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;Pr&lt;/span&gt;&lt;span class="o"&gt;(&amp;gt;|&lt;/span&gt;&lt;span class="n"&gt;t&lt;/span&gt;&lt;span class="o"&gt;|)&lt;/span&gt;&lt;span class="w"&gt;    &lt;/span&gt;
&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="n"&gt;Intercept&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="mf"&gt;0.775851&lt;/span&gt;&lt;span class="w"&gt;   &lt;/span&gt;&lt;span class="mf"&gt;0.026173&lt;/span&gt;&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="mf"&gt;29.64&lt;/span&gt;&lt;span class="w"&gt;   &lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="n"&gt;e&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="mi"&gt;16&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;***&lt;/span&gt;
&lt;span class="n"&gt;X&lt;/span&gt;&lt;span class="w"&gt;            &lt;/span&gt;&lt;span class="mf"&gt;0.479757&lt;/span&gt;&lt;span class="w"&gt;   &lt;/span&gt;&lt;span class="mf"&gt;0.001524&lt;/span&gt;&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="mf"&gt;314.84&lt;/span&gt;&lt;span class="w"&gt;   &lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="n"&gt;e&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="mi"&gt;16&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;***&lt;/span&gt;
&lt;span class="o"&gt;---&lt;/span&gt;
&lt;span class="n"&gt;Signif&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;codes&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;‘&lt;/span&gt;&lt;span class="o"&gt;***&lt;/span&gt;&lt;span class="err"&gt;’&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mf"&gt;0.001&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;‘&lt;/span&gt;&lt;span class="o"&gt;**&lt;/span&gt;&lt;span class="err"&gt;’&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mf"&gt;0.01&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;‘&lt;/span&gt;&lt;span class="o"&gt;*&lt;/span&gt;&lt;span class="err"&gt;’&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mf"&gt;0.05&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;‘&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="err"&gt;’&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mf"&gt;0.1&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;‘&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;’&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;

&lt;span class="n"&gt;Residual&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;standard&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;error&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mf"&gt;0.06866&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;on&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;27&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;degrees&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;of&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;freedom&lt;/span&gt;
&lt;span class="n"&gt;Multiple&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;R&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;squared&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="mf"&gt;0.9997&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt;&lt;span class="w"&gt;	&lt;/span&gt;&lt;span class="n"&gt;Adjusted&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;R&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;squared&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="mf"&gt;0.9997&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;
&lt;span class="n"&gt;F&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;statistic&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mf"&gt;9.912&lt;/span&gt;&lt;span class="n"&gt;e&lt;/span&gt;&lt;span class="o"&gt;+&lt;/span&gt;&lt;span class="mi"&gt;04&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;on&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;and&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;27&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;DF&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt;&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="n"&gt;p&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;value&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mf"&gt;2.2&lt;/span&gt;&lt;span class="n"&gt;e&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="mi"&gt;16&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;We can also lift the results from R to Python using &lt;code&gt;%Rget&lt;/code&gt;:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;coefs = %Rget val
y0,k = coefs.T[0:2]
y0,k
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;Which yields&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;(-0.77585097534858738, 0.4797570904348315)
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;Here we saw that RPy2 allows us to pass data back and forth between Python and R; This is incredibly useful to leverage the strengths of each language. This is a toy example, but you could imagine using various python libraries to get data from servers, and move to R for the statistical analysis.&lt;/p&gt;
&lt;p&gt;However, sometime moving data between languages may be too limiting. Let’s see how we can leverage the same mechanism to gain some performance, by integrating with a lower level language.&lt;/p&gt;
&lt;h2 id="lets-c"&gt;Let’s C&lt;/h2&gt;
&lt;p&gt;Python and R are not the most performant languages for pure numerical speed. When performance improvement is necessary, developers tend to utilize compiled language like C/C++/Fortran.&lt;/p&gt;
&lt;p&gt;Unfortunately, compiled languages generally have a poor interactive experience, and where CPU cycles are gained, human developer time may be lost.&lt;/p&gt;
&lt;p&gt;Using magics, we can, as we did for R, include snippets of C, Cython, Fortran, Rust … and many other languages.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="kn"&gt;import&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nn"&gt;cffi_magic&lt;/span&gt;
&lt;span class="o"&gt;%%&lt;/span&gt;&lt;span class="n"&gt;cffi&lt;/span&gt; &lt;span class="nb"&gt;int&lt;/span&gt; &lt;span class="n"&gt;cfib&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nb"&gt;int&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

&lt;span class="nb"&gt;int&lt;/span&gt; &lt;span class="n"&gt;cfib&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nb"&gt;int&lt;/span&gt; &lt;span class="n"&gt;n&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nb"&gt;int&lt;/span&gt; &lt;span class="n"&gt;res&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;n&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;=&lt;/span&gt; &lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;){&lt;/span&gt;  
        &lt;span class="n"&gt;res&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;else&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="n"&gt;res&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;cfib&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;n&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="o"&gt;+&lt;/span&gt;&lt;span class="n"&gt;cfib&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;n&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="n"&gt;res&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;We can interactively redefine this function, and it will magically appear on the Python namespace. It works identically to the &lt;code&gt;fib&lt;/code&gt; we defined earlier, but is much faster. Note that the Python Fib, and C fib time here are difficult to compare as the C one is recursive (behave in &lt;code&gt;O(exp(n)))&lt;/code&gt;and the Python one is hand unrolled, so behave in &lt;code&gt;O(n)&lt;/code&gt; .&lt;/p&gt;
&lt;p&gt;More technical details can be found in &lt;a href="https://matthiasbussonnier.com/posts/23-Cross-Language-Integration.html"&gt;a notebook I wrote earlier&lt;/a&gt;, but the same can be done with other languages that call one another, and lines like the following work perfectly:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;assert py_fib(cython_fib(c_fib(fortran_fib(rust_fib(5)))) == 5
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;h2 id="julia-to-bind-them-all"&gt;Julia to bind them all&lt;/h2&gt;
&lt;p&gt;The last example is a technical marvel that was first developed by Steven Johnson and Fernando Pérez, it relies on starting a Julia and Python interpreter &lt;em&gt;together&lt;/em&gt;, allowing them to share memory. This allow both languages not only to exchange data and functions, but to manipulate &lt;em&gt;live&lt;/em&gt; object references from the other interpreter. Extra integration with IPython via magics allows us to run inline Julia in Python (&lt;code&gt;%julia&lt;/code&gt;, &lt;code&gt;%%julia&lt;/code&gt;), while Julia Macros (&lt;code&gt;@pyimport&lt;/code&gt;) allows python code to be run from within Julia.&lt;/p&gt;
&lt;p&gt;Below we’ll show integration with Graphing libraries (matplotlib), so let’s set up our environment.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="nf"&gt;%matplotlib&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kr"&gt;inline&lt;/span&gt;
&lt;span class="nf"&gt;%load_ext&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;julia&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;magic&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;We’ll start from within Julia, and import a few python packages:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="o"&gt;%&lt;/span&gt;&lt;span class="n"&gt;julia&lt;/span&gt; &lt;span class="nd"&gt;@pyimport&lt;/span&gt; &lt;span class="n"&gt;matplotlib&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;pyplot&lt;/span&gt; &lt;span class="k"&gt;as&lt;/span&gt; &lt;span class="n"&gt;plt&lt;/span&gt;
&lt;span class="o"&gt;%&lt;/span&gt;&lt;span class="n"&gt;julia&lt;/span&gt; &lt;span class="nd"&gt;@pyimport&lt;/span&gt; &lt;span class="n"&gt;numpy&lt;/span&gt; &lt;span class="k"&gt;as&lt;/span&gt; &lt;span class="n"&gt;np&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;We now have access – from within Julia – to matplotlib and numpy. We can now seamlessly integrate Julia native numerical capabilities and functions with our Python kernel.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="c"&gt;%%julia                                        &lt;/span&gt;
&lt;span class="n"&gt;t&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nb"&gt;linspace&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="o"&gt;*&lt;/span&gt;&lt;span class="nb"&gt;pi&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="mi"&gt;1000&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;&lt;span class="w"&gt;             &lt;/span&gt;
&lt;span class="n"&gt;s&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nb"&gt;sin&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;3&lt;/span&gt;&lt;span class="o"&gt;*&lt;/span&gt;&lt;span class="n"&gt;t&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;+&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;4&lt;/span&gt;&lt;span class="o"&gt;*&lt;/span&gt;&lt;span class="n"&gt;np&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;cos&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="o"&gt;*&lt;/span&gt;&lt;span class="n"&gt;t&lt;/span&gt;&lt;span class="p"&gt;));&lt;/span&gt;&lt;span class="w"&gt;           &lt;/span&gt;
&lt;span class="n"&gt;fig&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;plt&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;gcf&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;&lt;span class="w"&gt;                         &lt;/span&gt;
&lt;span class="n"&gt;plt&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;plot&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;t&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;s&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;color&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;&amp;quot;red&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;linewidth&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="mf"&gt;2.0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;linestyle&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;&amp;quot;--&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;label&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;&amp;quot;sin(3t+4.cos(2t))&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;Note that in above block, &lt;code&gt;t&lt;/code&gt;, &lt;code&gt;pi&lt;/code&gt; are native julia; &lt;code&gt;s&lt;/code&gt; is computed via &lt;code&gt;sin&lt;/code&gt; (julia), &lt;code&gt;t&lt;/code&gt; (julia), &lt;code&gt;cos&lt;/code&gt; (numpy); &lt;code&gt;fig&lt;/code&gt; is a Python object. As the Julia Magic provides IPython display integration, the code above displays this nice graph.&lt;/p&gt;
&lt;p&gt;&lt;img src="https://jasongrout.github.io/medium-archive/pelican/posts/2018/i-python-you-r-we-julia/images/003-1_DEtOH4NVIEGL65S598P6kQ.webp" alt="" loading="lazy" data-body-image=""&gt;&lt;/p&gt;
&lt;p&gt;We now want to annotate this graph from Python, as the API is more convenient:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="kn"&gt;import&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nn"&gt;numpy&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="k"&gt;as&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nn"&gt;np&lt;/span&gt;
&lt;span class="n"&gt;fig&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="o"&gt;%&lt;/span&gt;&lt;span class="n"&gt;julia&lt;/span&gt; &lt;span class="n"&gt;fig&lt;/span&gt;
&lt;span class="n"&gt;fig&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;axes&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;plot&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;X&lt;/span&gt;&lt;span class="p"&gt;[:&lt;/span&gt;&lt;span class="mi"&gt;6&lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt; &lt;span class="n"&gt;np&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="kp"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;Y&lt;/span&gt;&lt;span class="p"&gt;[:&lt;/span&gt;&lt;span class="mi"&gt;6&lt;/span&gt;&lt;span class="p"&gt;]),&lt;/span&gt; &lt;span class="s1"&gt;&amp;#39;--&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;label&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s1"&gt;&amp;#39;fib&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="n"&gt;fig&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;axes&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;set_title&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;&amp;#39;A weird Julia function and Fib&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="n"&gt;fig&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;axes&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;legend&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
&lt;span class="n"&gt;fig&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;After passing a reference to &lt;code&gt;fig&lt;/code&gt; from Julia to Python, we can annotate it (and plot one of the &lt;code&gt;fib&lt;/code&gt; functions we defined earlier in C, Fortran, Rust, etc…)&lt;/p&gt;
&lt;p&gt;&lt;img src="https://jasongrout.github.io/medium-archive/pelican/posts/2018/i-python-you-r-we-julia/images/004-1_jJ1qjNDSNeBm78cnBLZsIg.webp" alt="" loading="lazy" data-body-image=""&gt;&lt;/p&gt;
&lt;p&gt;Here we can see that unlike BeakerX, R-Reticular or RPy2, we are actually sharing live objects, and can manipulate them from both languages. But let’s push things a bit further.&lt;/p&gt;
&lt;p&gt;The &lt;code&gt;fib&lt;/code&gt; function can be defined recursively; let’s have some fun and define a &lt;code&gt;pyfib&lt;/code&gt; function in Python that recurses via the a &lt;code&gt;jlfib&lt;/code&gt; function in Julia. Meanwhile, the &lt;code&gt;jlfib&lt;/code&gt; function in Julia recurses using the python function. We’ll print &lt;code&gt;(J&lt;/code&gt; , or &lt;code&gt;(P&lt;/code&gt; when switching language:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;jlfib = %julia _fib(n, pyfib) = n &amp;lt;= 2 ? 1 : pyfib(n-1, _fib) + pyfib(n-2, _fib)

def pyfib(n, _fib):
    print(&amp;#39;(P&amp;#39;, end=&amp;#39;&amp;#39;)
    if n &amp;lt;= 2:
         r = 1
    else:
        print(&amp;#39;(J&amp;#39;, end=&amp;#39;&amp;#39;)
        # here we tell julia (_fib) to recurse using Python
        r =  _fib(n-1, pyfib) + _fib(n-2, pyfib)
        print(&amp;#39;)&amp;#39;,end=&amp;#39;&amp;#39;)
    print(&amp;#39;)&amp;#39;,end=&amp;#39;&amp;#39;)
    return r
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;fibonacci = lambda x: pyfib(x, jlfib)
fibonacci(10)
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;We can now transparently call the function :&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;(P(J(P(J(P(J(P(J(P)(P)))(P(J))(P(J))(P)))(P(J(P(J))(P)(P)(P)))(P(J(P(J))(P)(P)(P)))(P(J(P)(P)))))(P(J(P(J(P(J))(P)(P)(P)))(P(J(P)(P)))(P(J(P)(P)))(P(J))))(P(J(P(J(P(J))(P)(P)(P)))(P(J(P)(P)))(P(J(P)(P)))(P(J))))(P(J(P(J(P)(P)))(P(J))(P(J))(P)))))
55
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;If you are interested in diving more into details see &lt;a href="https://matthiasbussonnier.com/posts/23-Cross-Language-Integration.html"&gt;this post&lt;/a&gt; from a couple of years ago with all the actual code.&lt;/p&gt;
&lt;p&gt;I hope that this post has convinced you that Jupyter – via the IPython kernel – has deep cross-language integration (and has had this for many years). I also hope it lifted the misconception in that in Jupyter “1 kernel == 1 language” or even that “1 notebook == 1 language”. Each of the approaches shown here (as well as Reticulate, BeakerX, etc) have their pros and cons. Use the approach that fits your needs and makes your workflow efficient, regardless of the tool, language, or libraries you use.&lt;/p&gt;
</content><category term="kernels"/></entry><entry><title>JupyterCon 2018: Registration Open</title><link href="https://jasongrout.github.io/medium-archive/pelican/posts/2018/jupytercon-2018-registration-open/" rel="alternate"/><published>2018-04-11T15:01:00+00:00</published><updated>2018-08-16T19:35:00+00:00</updated><author><name>M Bussonnier</name></author><id>tag:jasongrout.github.io,2018-04-11:/medium-archive/pelican/posts/2018/jupytercon-2018-registration-open/</id><summary type="html">&lt;p&gt;Dear Jupyter Community,&lt;/p&gt;
</summary><content type="html">&lt;p&gt;Dear Jupyter Community,&lt;/p&gt;
&lt;p&gt;For the past six months, the Project Jupyter team in collaboration with O’Reilly Media and NumFOCUS have been planning &lt;a href="https://oreil.ly/2Engevs"&gt;JupyterCon 2018&lt;/a&gt;. In January, we opened the &lt;a href="/posts/2018/jupytercon-2018-call-for-proposal/"&gt;Call For Proposal&lt;/a&gt;, during which we received numerous high-quality proposals. The total submissions exceed our expectations: more than 3 times the number of available slots! With the help of the Program Committee Reviewers and co-chairs Fernando Pérez, Brian Granger and Paco Nathan, we had the hard job of selecting among the fantastic submissions we received. Today we are happy to announce that most of the JupyterCon 2018 Program is ready and &lt;a href="https://oreil.ly/2Engevs"&gt;&lt;strong&gt;registration is open&lt;/strong&gt;&lt;/a&gt;! We are exited to bring you sessions about Scaling JupyterHub, leveraging GPUs for Jupyter, Running C++, in Jupyter, and many more.&lt;/p&gt;
&lt;figure&gt;
&lt;img alt="Fernando Pérez and Andrew Odewahn during JupyterCon 2017 Opening Keynote" src="https://jasongrout.github.io/medium-archive/pelican/posts/2018/jupytercon-2018-registration-open/images/001-1_-DqMOJzy1XN-UnTaLKZaow.jpeg" loading="lazy" data-body-image=""&gt;
&lt;figcaption&gt;Fernando Pérez and Andrew Odewahn during JupyterCon 2017 Opening Keynote&lt;/figcaption&gt;
&lt;/figure&gt;
&lt;p&gt;As Paco Nathan previously &lt;a href="/posts/2018/jupytercon-2018-nyc-august-21-25/"&gt;announced&lt;/a&gt;, this year will have a dedicated &lt;strong&gt;Education Track,&lt;/strong&gt; and &lt;strong&gt;Business Summit&lt;/strong&gt; to supplement the &lt;strong&gt;Main Tracks, Trainings, and Tutorials&lt;/strong&gt; that we already brought to you last year. Many of the highlights of last year such as &lt;strong&gt;“Meet the Experts”&lt;/strong&gt; office hours, a &lt;strong&gt;Poster Session&lt;/strong&gt; for extended discussions with presenters, and the &lt;strong&gt;Vendor Expo Hall&lt;/strong&gt; will return this year.&lt;/p&gt;
&lt;p&gt;As with last year, JupyterCon will be held at the &lt;strong&gt;New York Hilton Midtown, NYC, August 21-24&lt;/strong&gt; and &lt;strong&gt;Saturday 25th&lt;/strong&gt;. You can &lt;a href="https://oreil.ly/2Engevs"&gt;register today&lt;/a&gt; for the main conference. Early Bird pricing ends on May 18th. You can also use the &lt;strong&gt;discount code&lt;/strong&gt; &lt;code&gt;PJ20&lt;/code&gt;. We also have a limited amount of &lt;a href="https://docs.google.com/forms/d/e/1FAIpQLSecO-a3x8PA2m0eFJ_8_gmjdEmcWmM_h0O5VVD7c7JusVh8wg/viewform"&gt;financial support for JupyterCon&lt;/a&gt; for attendees thanks to our partners. Last year, we provided scholarships to 13 students from diverse backgrounds to attend JupyterCon 2017.&lt;/p&gt;
&lt;h2 id="community-sprint-day-august-25th"&gt;Community Sprint Day, August 25th.&lt;/h2&gt;
&lt;p&gt;Thanks to Bloomberg&lt;strong&gt;, Saturday, August 25th&lt;/strong&gt; will be reserved for a separate &lt;a href="https://www.eventbrite.com/e/jupytercon-community-sprint-day-tickets-48679310127"&gt;&lt;strong&gt;Community Sprint day&lt;/strong&gt;&lt;/a&gt;, free of charge. All community members, whether or not you plan to attend the main conference, are invited. This day will be focused on community, contributing to Jupyter, and Open Source in a “Open Studio” form. Whether you are new to Jupyter or a power user, we invite you to come and mingle with the rest of the attendees to lean about any Jupyter-related project.&lt;/p&gt;
&lt;p&gt;Several activities will be available. Whether you have coding, design, or writing skills, we encourage you to contribute, pitch your ideas, and get started on something brand new.&lt;/p&gt;
&lt;p&gt;&lt;img src="https://jasongrout.github.io/medium-archive/pelican/posts/2018/jupytercon-2018-registration-open/images/002-1_Dd2zMnOvFbSdzClbeBxuFg.jpeg" alt="" loading="lazy" data-body-image=""&gt;&lt;/p&gt;
&lt;p&gt;Are you new to open source, Git, and GitHub? We’ll offer a introduction to &lt;strong&gt;Open-Source 101&lt;/strong&gt; and how to get development versions on your machine.&lt;/p&gt;
&lt;p&gt;You’ve never tried Jupyter or you are an advanced user of Jupyter with specific needs? We’ll be hosting a &lt;strong&gt;JupyterLab user-testing session&lt;/strong&gt; where you will have the chance to try upcoming features and give us critical insight on how to improve usability.&lt;/p&gt;
&lt;p&gt;Interested in contributing back to Jupyter or related projects? Many experts will be here to help you move your project forward. If you are coming to JupyterCon and would like to &lt;strong&gt;help&lt;/strong&gt; with &lt;a href="https://www.eventbrite.com/e/jupytercon-community-sprint-day-tickets-48679310127"&gt;&lt;strong&gt;Community Sprint Day,&lt;/strong&gt;&lt;/a&gt; or have a project you’d like attendees to work on let us know !&lt;/p&gt;
&lt;p&gt;The &lt;a href="https://www.eventbrite.com/e/jupytercon-community-sprint-day-tickets-48679310127"&gt;Community Sprint Day&lt;/a&gt; is free to attend, but &lt;a href="https://www.eventbrite.com/e/jupytercon-community-sprint-day-tickets-48679310127"&gt;registration is required&lt;/a&gt;.&lt;/p&gt;
&lt;h2 id="jupyter-pop-up-dc-may-15th"&gt;Jupyter Pop-Up, DC, May 15th&lt;/h2&gt;
&lt;p&gt;You can’t wait to attend JupyterCon 2018 ? You can attend &lt;a href="https://www.eventbrite.com/e/jupyter-pop-up-dc-tickets-44090939186?aff=jcwebsite"&gt;Jupyter Pop-Up, DC, May 15th&lt;/a&gt; for a Day long event, and a taste of what is to come !&lt;/p&gt;
&lt;p&gt;Do not forget to follow this blog, &lt;a href="https://twitter.com/projectJupyter"&gt;@projectJupyter&lt;/a&gt; or &lt;a href="https://twitter.com/JupyterCon/"&gt;@jupytercon&lt;/a&gt;, for further updates on JupyterCon.&lt;/p&gt;
&lt;p&gt;Thanks to The O’Reilly Media Team; The Conference Chairs (Brian Granger, Paco Nathan and Fernando Pérez); The Program Committee (Dan Allan, Ian Allison, Paige Bailey, Lorena Barba, Tom Caswell, Afshin Darian, John Detlefs, Chris Erdmann, Jessica Forde, Stuart Geiger, Tim George, Michelle Gill, Tim Head, Jennifer Klay, Cierra Martinez, Emiliy Jane McTavish, Omoju Miller, M Pacer, Peter Parente, Eszti Schoell, Steve Silvester, Robert Talbert, Dwight Townsend, Wolf Vollprecht, Jamie Whitacre, Kevin Zielnicki) and all the people making JupyterCon 2018 possible, and Jupyter a reality.&lt;/p&gt;
</content><category term="events"/><category term="JupyterCon"/></entry><entry><title>Jupyter Pop-Up, March 21, Boston</title><link href="https://jasongrout.github.io/medium-archive/pelican/posts/2018/jupyter-pop-up-march-21-boston/" rel="alternate"/><published>2018-02-09T22:20:00+00:00</published><updated>2018-02-09T22:20:00+00:00</updated><author><name>M Bussonnier</name></author><id>tag:jasongrout.github.io,2018-02-09:/medium-archive/pelican/posts/2018/jupyter-pop-up-march-21-boston/</id><summary type="html">&lt;p&gt;A new series of local Jupyter events, starting in Boston.&lt;/p&gt;
</summary><content type="html">&lt;p&gt;A new series of local Jupyter events, starting in Boston.&lt;/p&gt;
&lt;figure&gt;
&lt;img alt="Jupyter Pop-Up, brought to you by NumFOCUS and O’Reilly Media, March 21, Boston, MA." src="https://jasongrout.github.io/medium-archive/pelican/posts/2018/jupyter-pop-up-march-21-boston/images/001-1_uYXtEHsSpXF7flT8eZdeQQ.webp" loading="lazy" data-body-image=""&gt;
&lt;figcaption&gt;Jupyter Pop-Up, brought to you by NumFOCUS and O’Reilly Media, March 21, Boston, MA.&lt;/figcaption&gt;
&lt;/figure&gt;
&lt;p&gt;Many of you are looking forward to &lt;a href="/posts/2018/jupytercon-2018-call-for-proposal/"&gt;JupyterCon 2018&lt;/a&gt; and have &lt;a href="/posts/2018/jupytercon-2018-call-for-proposal/"&gt;submitted a talk&lt;/a&gt;. Alongside these large, multi-day events, we are seeing demand for smaller, local events as well. Since 2015 we have co-organized several Jupyter Days events (&lt;a href="/posts/2016/jupyterday-paris/"&gt;Paris&lt;/a&gt;, &lt;a href="/posts/2016/jupyterday-hawaii-2016/"&gt;Hawaii&lt;/a&gt;, &lt;a href="/posts/2016/jupyterday-atlanta-2016/"&gt;Atlanta&lt;/a&gt;, &lt;a href="/posts/2016/jupyterdays-boston-2016/"&gt;Boston&lt;/a&gt;, &lt;a href="http://jupyterday.blogs.brynmawr.edu/"&gt;Philadelphia&lt;/a&gt;, &lt;a href="/posts/2015/jupyterday-nyc/"&gt;NYC&lt;/a&gt;) with local community organizers. In 2018, we are preparing &lt;a href="/posts/2018/announcing-jupyter-day-atlanta-spring-2018/"&gt;Jupyter Day Atlanta&lt;/a&gt; (March 31st), and hoping to offer other community organized events as well.&lt;/p&gt;
&lt;p&gt;In addition to Jupyter Days, we are pleased to announce the first Jupyter Pop-Up, which is brought to you by the &lt;a href="https://www.numfocus.org/"&gt;NumFOCUS&lt;/a&gt; Foundation and &lt;a href="https://www.oreilly.com/conferences/"&gt;O’Reilly Media&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;This single-day conference will take place in the &lt;a href="https://conferences.oreilly.com/jupyter/popup-ma"&gt;District Hall of Boston, MA on March 21&lt;/a&gt;, Early Bird ticket prices end on &lt;a href="https://www.eventbrite.com/e/jupyter-pop-up-tickets-42550005211"&gt;February 23rd&lt;/a&gt;, and the &lt;a href="https://docs.google.com/forms/d/e/1FAIpQLSc4D4dHObuzrzlTfvXFWulU43hVPP48XG2x-YCxR228sssCPg/viewform"&gt;Call For Proposals&lt;/a&gt; is still open until the end of the week (Sunday, Feb. 11th).&lt;/p&gt;
&lt;p&gt;You can learn more on the &lt;a href="https://conferences.oreilly.com/jupyter/popup-ma"&gt;Jupyter Pop-Up conference website&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Looking forward to seeing you there !&lt;/p&gt;
</content><category term="events"/></entry><entry><title>JupyterCon 2018: Call For Proposal</title><link href="https://jasongrout.github.io/medium-archive/pelican/posts/2018/jupytercon-2018-call-for-proposal/" rel="alternate"/><published>2018-01-18T22:53:00+00:00</published><updated>2018-02-20T21:27:00+00:00</updated><author><name>M Bussonnier</name></author><id>tag:jasongrout.github.io,2018-01-18:/medium-archive/pelican/posts/2018/jupytercon-2018-call-for-proposal/</id><summary type="html">&lt;p&gt;Dear fellow Jovyans,&lt;/p&gt;
</summary><content type="html">&lt;p&gt;&lt;img src="https://jasongrout.github.io/medium-archive/pelican/posts/2018/jupytercon-2018-call-for-proposal/images/001-1_OSsa7iznmO0xoicq3uZHhg.webp" alt="" loading="lazy" data-body-image=""&gt;&lt;/p&gt;
&lt;p&gt;Dear fellow Jovyans,&lt;/p&gt;
&lt;p&gt;It is with great pleasure that we are &lt;a href="https://conferences.oreilly.com/jupyter/jup-ny/public/cfp/621"&gt;opening the Call For Proposals (CFP&lt;/a&gt;) for &lt;a href="https://conferences.oreilly.com/jupyter/jup-ny"&gt;JupyterCon 2018&lt;/a&gt;!&lt;/p&gt;
&lt;p&gt;Last August, Project Jupyter, the NumFOCUS Foundation, and O’Reilly Media came together to host our first &lt;a href="https://conferences.oreilly.com/jupyter/jup-ny-2017"&gt;JupyterCon&lt;/a&gt;. We attracted over 700 attendees and 23 scholarship recipients for 4 days of talks and tutorials. There were 5 parallel session tracks featuring 55 talks, 11 keynotes, 55 talks, 8 tutorials, and 2 training courses. In addition, the conference poster session featured 33 posters and fostered great discussions within the community. Our Community Day, held at at the end of the conference featured free registration was open to the general public. Videos of the event have been made available on &lt;a href="https://www.safaribooksonline.com/library/view/jupytercon-2017-/9781491985311/"&gt;Safari Online&lt;/a&gt; and &lt;a href="https://www.youtube.com/playlist?list=PL055Epbe6d5aP6Ru42r7hk68GTSaclYgi"&gt;YouTube&lt;/a&gt;.&lt;/p&gt;
&lt;h2 id="jupytercon-2018-cfp-open"&gt;JupyterCon 2018, CFP Open&lt;/h2&gt;
&lt;p&gt;&lt;img src="https://jasongrout.github.io/medium-archive/pelican/posts/2018/jupytercon-2018-call-for-proposal/images/002-1_eBDo76BnRMrk-OHLzlSd6g.jpeg" alt="" loading="lazy" data-body-image=""&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="https://conferences.oreilly.com/jupyter/jup-ny-2017"&gt;JupyterCon 2017&lt;/a&gt; was a huge success and we’ve been working hard since then to make &lt;a href="https://conferences.oreilly.com/jupyter/jup-ny"&gt;JupyterCon 2018&lt;/a&gt; even better. It will be held in New York City in August from Tuesday the 21st to Friday the 24th. We’ll also host an open Community Day on August 25th, which will be open to everyone.&lt;/p&gt;
&lt;p&gt;Today we are happy to open the &lt;a href="https://conferences.oreilly.com/jupyter/jup-ny"&gt;conference website&lt;/a&gt; and open the &lt;a href="https://conferences.oreilly.com/jupyter/jup-ny/public/cfp/621"&gt;Call For Proposal&lt;/a&gt; with submissions due by &lt;strong&gt;early March&lt;/strong&gt;. A couple of changes have been made to the CFP since last year. In particular if your talk is not accepted, you can ask us to automatically consider the proposal for the poster session.&lt;/p&gt;
&lt;p&gt;We encourage you to submit a proposal, and reach out to us if you have any questions. We’ll do our best to help you and and give you feedback on your proposal.&lt;/p&gt;
&lt;p&gt;Like last year, we will have diversity and student scholarships available; further information will be provided on the website. We also encourage you to follow the JupyterCon &lt;a href="https://twitter.com/jupytercon"&gt;Twitter account&lt;/a&gt; for announcements or corrections.&lt;/p&gt;
&lt;h2 id="community-day"&gt;Community Day&lt;/h2&gt;
&lt;p&gt;The final day of JupyterCon 2017 was a blast with a large number of people making their first contribution to the Jupyter codebase, to the documentation, editing the wiki, or deploying it in the cloud. During the conference days, a separate room was also reserved for user testing of different Jupyter software, which proved to be fantastic source of feedback for User Experience (UX) and driving various Jupyter Tools forward.&lt;/p&gt;
&lt;p&gt;&lt;img src="https://jasongrout.github.io/medium-archive/pelican/posts/2018/jupytercon-2018-call-for-proposal/images/003-1_geuYDAU8htqwczKSJ2peCw.jpeg" alt="" loading="lazy" data-body-image=""&gt;&lt;/p&gt;
&lt;p&gt;We are happy to offer this “Community Day” experience again. At JupyterCon 2017, the Saturday was branded “Sprints” with the connotation of a code-centric experience. While we’re happy to see users coming to “Sprint” on code, we want to let you know that the Community Day will be open to anyone. Whether you are a teacher, coder, researcher, or user of Jupyter, the Community Day will have something for you. The Community Day is not limited to attendees of the main JupyterCon event, and it’s intended to be a “grass-roots” celebration of Jupyter and its community. We hope to see you at JupyterCon 2018.&lt;/p&gt;
&lt;h2 id="thanks"&gt;Thanks&lt;/h2&gt;
&lt;p&gt;JupyterCon 2018 would not be possible without &lt;a href="https://www.oreilly.com/"&gt;O’Reilly Media&lt;/a&gt;, &lt;a href="https://www.numfocus.org/"&gt;NumFocus&lt;/a&gt;, &lt;a href="https://conferences.oreilly.com/jupyter/jup-ny/public/content/sponsors"&gt;as well as our sponsors&lt;/a&gt;.&lt;/p&gt;
</content><category term="events"/><category term="JupyterCon"/></entry><entry><title>Incident Report: Jupyter services down</title><link href="https://jasongrout.github.io/medium-archive/pelican/posts/2017/incident-report-jupyter-services-down/" rel="alternate"/><published>2017-12-14T19:52:00+00:00</published><updated>2017-12-14T20:46:00+00:00</updated><author><name>M Bussonnier</name></author><id>tag:jasongrout.github.io,2017-12-14:/medium-archive/pelican/posts/2017/incident-report-jupyter-services-down/</id><summary type="html">&lt;p&gt;update: December 14, 20:45 UTC, all services should be restored and back up.&lt;/p&gt;
</summary><content type="html">&lt;p&gt;&lt;strong&gt;update:&lt;/strong&gt; December 14, 20:45 UTC, all services should be restored and back up.&lt;/p&gt;
&lt;p&gt;On December 13, at 22:10 UTC (4:10pm EST), a large number of Jupyter-provided services stopped responding. This included, but was not limited to &lt;a href="https://nbviewer.jupyter.org,"&gt;https://nbviewer.jupyter.org,&lt;/a&gt; &lt;a href="https://try.jupyter.org"&gt;https://try.jupyter.org&lt;/a&gt; (powered by tmpnb) and &lt;a href="https://cdn.jupyter.org"&gt;https://cdn.jupyter.org&lt;/a&gt;. We quickly narrowed this down to an issue with our hosting provider and have been working with them to resolve the issue as fast as possible.&lt;/p&gt;
&lt;p&gt;When outages happen, the &lt;a href="http://status.jupyter.org/"&gt;Jupyter Status page&lt;/a&gt; should show which services are affected and we publish updates there.&lt;/p&gt;
&lt;h2 id="how-are-jupyter-services-hosted"&gt;How are Jupyter services hosted?&lt;/h2&gt;
&lt;p&gt;To understand the cause of the outage, we need to understand how the Jupyter services are hosted and maintained. As Jupyter is an open organization which is mostly maintained by volunteers, we do not have a dev-ops team assigned to maintaining our infrastructure. Even with full-time developers hired through universities or companies, the time spent fixing infrastructure is taken on nights and weekends. These developers are often stretched thin and cannot be available 24/7.&lt;/p&gt;
&lt;p&gt;Most of our cloud infrastructure is donated to us by companies like &lt;a href="https://www.cloudflare.com/"&gt;CloudFlare&lt;/a&gt;, &lt;a href="https://www.rackspace.com/"&gt;Rackspace&lt;/a&gt;, &lt;a href="http://cloudflare"&gt;Fastly&lt;/a&gt;, &lt;a href="https://cloud.google.com/"&gt;Google&lt;/a&gt;, and &lt;a href="https://azure.microsoft.com"&gt;Microsoft&lt;/a&gt;. Donating resources can be challenging, both technically and legally. In this particular case, Rackspace graciously created a special account for Jupyter that handles invoices on our behalf, thereby making resources free to the project. Following a hiccup, this Jupyter account was suspended and all services are unavailable as a result.&lt;/p&gt;
&lt;h2 id="temporary-resolution"&gt;Temporary resolution&lt;/h2&gt;
&lt;p&gt;As nbviewer is one of the most used services provided by Jupyter, we’ve moved it to one of our personal account at another cloud-provider. &lt;a href="https://www.fastly.com/"&gt;Fastly&lt;/a&gt; was set up to load-balance on the yet-to-come-back-up instances as well as this newly created instance, so all should be fine now.&lt;/p&gt;
&lt;p&gt;The other services (tmpnb, mails@jupyter.org, cdn.jupyter.org, …) will still unavailable or highly degraded until a permanent solution is found, or the services are restarted. &lt;code&gt;try.jupyter.org&lt;/code&gt; will likely redirect to a repo on &lt;a href="https://mybinder.org"&gt;https://mybinder.org&lt;/a&gt; in the meantime so people can still try out Jupyter.&lt;/p&gt;
&lt;h2 id="low-bus-factor"&gt;Low bus factor&lt;/h2&gt;
&lt;p&gt;The outage of all these services lasted for a significant time (more than 18 hours). Which perturbed many of you relying on these services. We understand that this is hardly acceptable and we hope you’ll indulge us as these services are provided for free and without ads. One of the factors leading to the slow reestablishment of service was a relatively low &lt;a href="https://en.wikipedia.org/wiki/Bus_factor"&gt;bus factor&lt;/a&gt;, with only one and a half of our developers knowing how to deploy and maintain these services. Documentation and access to credentials was also limited.&lt;/p&gt;
&lt;p&gt;This is one of the challenges in a distributed team like Jupyter where contributors self-organize. It is easy to forget that new code is not the only way to contribute and that &lt;a href="https://www.nytimes.com/2017/07/22/opinion/sunday/lets-get-excited-about-maintenance.html"&gt;infrastructure and maintenance&lt;/a&gt; are crucial.&lt;/p&gt;
&lt;p&gt;We also overly rely on a single vendor (in this case Rackspace), and while we are happy with Rackspace and have no reason to move to another provider, we should have a plan to restore critical services even temporarily in case of failure.&lt;/p&gt;
&lt;p&gt;A couple of months ago, the subject was brought to our attention, and we developed a plan to move many of our deployment to &lt;a href="https://k8s.io"&gt;Kubernetes&lt;/a&gt; (which is provider agnostic). We underestimated the probability to need an emergency plan this early.&lt;/p&gt;
&lt;h2 id="how-can-you-help"&gt;How can you help&lt;/h2&gt;
&lt;p&gt;Jupyter is mainly governed by the community all around the world. Contributing is not limited to writing code! We need members with knowledge in multiple languages, in design, dev-ops, etc. Whether you are an expert, or still learning, we would like you to &lt;a href="https://jupyter.org/community.html"&gt;get involved&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Thanks everyone for your patience and the kind words when you reached to us when discovering the services were down.&lt;/p&gt;
</content><category term="cloud computing"/><category term="DevOps"/></entry><entry><title>Enjoy JupyterCon 2017 on YouTube</title><link href="https://jasongrout.github.io/medium-archive/pelican/posts/2017/enjoy-jupytercon-2017-on-youtube/" rel="alternate"/><published>2017-11-24T10:09:00+00:00</published><updated>2018-01-08T16:43:00+00:00</updated><author><name>M Bussonnier</name></author><id>tag:jasongrout.github.io,2017-11-24:/medium-archive/pelican/posts/2017/enjoy-jupytercon-2017-on-youtube/</id><summary type="html">&lt;p&gt;About a year ago the Jupyter team started a partnership with O’Reilly Media and NumFOCUS to organize JupyterCon 2017, the first in a series…&lt;/p&gt;
</summary><content type="html">&lt;p&gt;About a year ago the Jupyter team started a partnership with &lt;a href="https://www.oreilly.com/"&gt;O’Reilly Media&lt;/a&gt; and &lt;a href="https://www.numfocus.org/"&gt;NumFOCUS&lt;/a&gt; to organize &lt;a href="https://conferences.oreilly.com/jupyter/jup-ny"&gt;JupyterCon 2017&lt;/a&gt;, the first in a series of Jupyter-related conferences. JupyterCon 2017 drew over 700 attendees and offered a fantastic set of tutorials, talks and keynotes from all corners of the Jupyter ecosystem. We could not have offered you such a beautiful conference without the O’Reilly Media and NumFOCUS partnership and teams.&lt;/p&gt;
&lt;h2 id="did-you-miss-jupytercon-2017"&gt;Did you miss JupyterCon 2017?&lt;/h2&gt;
&lt;p&gt;We have a strong commitment to open-source and we believe that everyone should have access to high-quality tools and content to push science, education and technology forward. O’Reilly Media is one of the top publishers in this space, and they already provide a variety of material and training related to Jupyter and the open-source data ecosystem of which it is a part (see O’Reilly’s Jupyter related content &lt;a href="https://www.oreilly.com/topics/jupyter"&gt;here&lt;/a&gt;). It is no surprise then that the full content of JupyterCon 2017, including keynotes, tutorials, talks and exclusive interviews, is available as videos on &lt;a href="https://www.safaribooksonline.com/library/view/jupytercon-2017-/9781491985311/"&gt;Safari Online&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;We are also pleased to announce that videos of all keynotes and talks (69 videos in total) are now available on YouTube on the&lt;/strong&gt; &lt;a href="https://www.youtube.com/playlist?list=PL055Epbe6d5aP6Ru42r7hk68GTSaclYgi"&gt;&lt;strong&gt;O’Reilly Media channel&lt;/strong&gt;&lt;/a&gt;. If you missed JupyterCon, or want to re-watch a talk, you can now add these to your watch-list! As an example here is the opening keynote given by Fernando Pérez:&lt;/p&gt;
&lt;iframe src="https://www.youtube-nocookie.com/embed/xuNj5paMuow" title="YouTube video" width="560" height="315" style="aspect-ratio: 560 / 315" loading="lazy" allow="accelerometer; clipboard-write; encrypted-media; gyroscope; picture-in-picture" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen&gt;&lt;/iframe&gt;
&lt;h2 id="see-you-next-august-for-jupytercon-2018"&gt;See you next August for JupyterCon 2018&lt;/h2&gt;
&lt;p&gt;We are thrilled to be able to provide you with all this content from JupyterCon 2017 to enjoy on YouTube. JupyterCon 2018 will be in NYC next August 22–24. We hope to see you there next year as an attendee, speaker or sponsor. You can sign up for email updates about JupyterCon 2018 on &lt;a href="https://www.oreilly.com/conferences/"&gt;this page&lt;/a&gt;.&lt;/p&gt;
&lt;h3 id="update-jan-2018-missing-talks"&gt;[Update Jan 2018] Missing Talks&lt;/h3&gt;
&lt;p&gt;The Talk “Jupyter and the changing rituals around computation” is missing from the channel due to technical issue during the recording.&lt;/p&gt;
</content><category term="events"/><category term="JupyterCon"/></entry><entry><title>Release of IPython 5.5 and 6.2</title><link href="https://jasongrout.github.io/medium-archive/pelican/posts/2017/release-of-ipython-5-5-and-6-2/" rel="alternate"/><published>2017-09-15T18:42:00+00:00</published><updated>2017-09-15T18:42:00+00:00</updated><author><name>M Bussonnier</name></author><id>tag:jasongrout.github.io,2017-09-15:/medium-archive/pelican/posts/2017/release-of-ipython-5-5-and-6-2/</id><summary type="html">&lt;p&gt;Four month after releasing IPython 6.1 and 5.4, and a couple of hours after the release of the notebook 5.1, we are happy to announce the…&lt;/p&gt;
</summary><content type="html">&lt;p&gt;Four month after releasing IPython 6.1 and 5.4, and a couple of hours after the release of the notebook 5.1, we are happy to announce the release of IPython 6.2 (Python 3 only), and it’s cousin IPython 5.5 still compatible with Python 2.7.&lt;/p&gt;
&lt;p&gt;You can update now by using:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;pip install --upgrade ipython
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;If you have a recent enough version of pip you will get the latest compatible version of IPython regardless of the version of Python you are running.&lt;/p&gt;
&lt;p&gt;The conda packages are on their way; once available you will be able to update with:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;conda install ipython
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;h2 id="new-features"&gt;New Features&lt;/h2&gt;
&lt;p&gt;As IPython 6.2 and 5.5 are minor releases you will only find a small number of new features. When API additions were done on IPython 6.2 they were backported on 5.5 to simplify the maintenance of code compatible both with Python 2.7 and 3+. You can find the full list of new features in the &lt;a href="http://ipython.readthedocs.io/en/stable/whatsnew/version6.html"&gt;changelog&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;As a quick teaser, IPython 6.2 can now:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Show function signature in the terminal while completing.&lt;/li&gt;
&lt;li&gt;Assignments can trigger the display mechanism&lt;/li&gt;
&lt;li&gt;IPdb can be called recursively&lt;/li&gt;
&lt;li&gt;Support for system-wide configuration&lt;/li&gt;
&lt;li&gt;Built-in support for Progress Bar.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Head &lt;a href="http://ipython.readthedocs.io/en/stable/whatsnew/version6.html#ipython-6-2"&gt;there&lt;/a&gt; for more complete description.&lt;/p&gt;
&lt;h2 id="slowing-down-backports-to-5x"&gt;Slowing down backports to 5.x&lt;/h2&gt;
&lt;p&gt;As stated on our &lt;a href="https://github.com/jupyter/roadmap/blob/master/accepted/migration-to-python-3-only.md"&gt;roadmap&lt;/a&gt;, we’ll keep releasing a 5.x for some time, though starting at end of year. However, we will decrease our active involvement in fixing bugs affecting the 5.x branch. We will still accept PRs, and backport if you nicely ask us. Releases will happen occasionally if fixes are available, but we will be sunsetting the Python 2 support slowly.&lt;/p&gt;
&lt;p&gt;If you are interested in further maintenance of the 5.x branch, we would love help with that work. Feel free to contact us on GitHub.&lt;/p&gt;
&lt;h2 id="whats-next"&gt;What’s next ?&lt;/h2&gt;
&lt;p&gt;We are going to start thinking about IPython 7, and start to embrace more of the Python 3 only features. Slowing down backports should allow us to be more confident that changes will not affect the automatic application of patches on old branches. Trimming down old legacy code may also help to regain some speed on interpreter startup, and should lead to plenty of opportunities for new contributors to join.&lt;/p&gt;
&lt;p&gt;We will also try to simplify our documentation, and make often requested sections easier to find.&lt;/p&gt;
&lt;p&gt;If you are looking for a project to contribute to – code, documentation, example, design, helping others, feel free to contact us so we can guide you through the process.&lt;/p&gt;
&lt;p&gt;Enjoy this new release, and hope to see you around the mailing list and bug tracker!&lt;/p&gt;
</content><category term="IPython"/><category term="releases"/></entry></feed>