r/IPython • • Nov 03 '15

Advanced Jupyter Notebook Tricks (Reminder)

Thumbnail
blog.dominodatalab.com
12 Upvotes

r/IPython • • Sep 20 '15

Easiest way to hide your input in code cells

Thumbnail blog.nextgenetics.net
12 Upvotes

r/IPython • • Jul 06 '15

IPython Notebooks: Interactive, test-driven coding challenges (algorithms and data structures)

Thumbnail
github.com
12 Upvotes

r/IPython • • Apr 14 '15

Creating animated 3-D data visualizations in IPython notebooks + matplotlib

Thumbnail
geoffboeing.com
12 Upvotes

r/IPython • • Mar 11 '15

What is new in IPython 3 / Jupyter

Thumbnail
youtube.com
12 Upvotes

r/IPython • • May 18 '14

Integrating Google Docs, Chrome, and IPython

Thumbnail
plus.google.com
12 Upvotes

r/IPython • • Apr 22 '14

IPython Notebook for Desktop - a first version

Thumbnail
github.com
12 Upvotes

r/IPython • • Apr 06 '14

Customising the IPython notebook UI

Thumbnail
eoinmurray.io
12 Upvotes

r/IPython • • Jan 30 '14

Python for Signal Processing

Thumbnail
python-for-signal-processing.blogspot.com
12 Upvotes

r/IPython • • Nov 07 '13

Running a public IPython Notebook service for teaching in university courses

12 Upvotes

Probably you are already convinced about using IPython Notebook for scientific computing. I am not advocating here why you should use IPython Notebook. But my focus is how you can create opportunity for using IPython Notebook in large classroom settings.

I was invited to propose a solution for an e-learning innovation project based on IPython Notebook. The purpose of this project was to provide students with a new and innovative way to better understand mathematical and physics principles that can be modelled through the use of IPython notebook. The core idea was to deliver an IPython notebook interface over browser. The students won’t install anything on their local machines. Everything would be installed on the server and each student would be accessing their own personal Notebook server (as there was no multi-user support enabled on the Notebook server at that time).

After a quick Google search it seemed to me that some guys already tried to solve this problem. Particularly the IPydra project developed by Zach Howard looked promising to me. It uses Python’s Flask web application framework for spawning IPython Notebook servers. The basic work flow was very simple. The user login to a homepage (interestingly without password!) and is being redirected to the default IPython Notebook server’s homepage/dashboard. Under the hood, the web application picks up a fixed port number based on user ID and spawn the Notebook server via the Python’s subprocess module. This solution is easy and simple but doesn’t provide enough hints how this can scale with hundreds of notebook servers and secure them from unauthorized access. As you may guess that if anyone knows the port number of other’s notebook server they can run that without any authorization.

As a long time Django developer, I was tempted to port this Flask-based IPydra implementation to Django, another cool Python web application framework. We had strong security requirements. So the first thing came on my mind is to authenticate users with LDAP. Django has a nice integration with open-ldap libraries. After some fiddling with our local LDAP configuration it seemed that LDAP integrates nicely with Django’s Pinax based mini application prototyping framework. Well, if you use Pinax you won’t worry much to write front-end pages or templates. My initial prototype is available from GitHub: https://github.com/writefaruq/django-ipython-nbserver.

In the first iteration, I just presented a proof-of-concept to our users that IPython Notebook servers can be launched by spawning via subprocess calls from Python code. It had the basic functionalities, i.e. users could login after authenticating against our LDAP server and could see the Notebook server’s web-based interface. But it was not behaving so well. Spawning Notebook server processes via Apache was not giving the right environment variables to the child IPython notebook server processes. This coupled solution seemed to me very inflexible and was difficult to scale well.

Then the idea of decoupling Notebook server processes from Apache came to my mind. Yes, I can use the Supervisor, another lovely Python package that can launch and manage processes e.g. start/stop/restart etc. So I re-wrote the entire application so that Notebook servers weren’t spawned directly from Apache web server process, rather Supervisor took the charge of launching and managing of Notebook server processes. Supervisor was configured to launch all the necessary Notebook server process. I wrote some Python utility scripts to automate this process. Supervisor has a nice web-based interface to see what’s happening with processes or to control them e.g. restart if needed.

In this case the web application was used to authenticate users against LDAP server and checks whether a user’s Notebook server was running on a certain port. If so, then it displayed the user certain settings to access his/her Notebook server URL e.g. http://<yourserver>:<port>. But we didn’t solve the issue of unauthorized access yet. Anybody with a valid LDAP account could login and a got a copy of Notebook spawned. This was not desired. We needed to restrict access to the selected group of users, say the students of particular class. Fortunately, IPython notebook servers can be launched in a pass-protected mode. In that case the Notebook server’s dashboard will ask a password before allowing anybody to see the notebooks. So in order to secure the Notebook servers they were setup to be launched in the password protected mode. Users logged in to the application homepage using their LDAP account and then they could see their Notebook server’s password and URL on a settings page. This protects the servers from public access but within the organization, in order to restrict access to a specific group we could define a custom LDAP group. But that was not so simple as access may be requested from any unknown group of users. So I had to add another extra layer of authorization. In this layer by default all users who logged in via LDAP won’t be able to access directly. They need to be approved by a site administrator via the Django backend admin.

The application was deployed on a production environment for serving about 200 students by a VM containing 16 GB RAM and 4 CPUs. Some more documents are available with the final version of this application from my GitHub repository: https://github.com/writefaruq/supervised-ipython-nbserver


r/IPython • • Oct 21 '13

Bootstrap in IPython

Thumbnail
nbviewer.ipython.org
12 Upvotes

r/IPython • • Oct 16 '13

The Traveling Salesperson Problem

12 Upvotes

The Traveling Salesperson Problem

This notebook is incomplete (found here) but the write up on approximate solutions is great. It appears to be close to complete, maybe a weekend project to fill in the missing pieces...


r/IPython • • Jul 31 '13

Introduction to Numpy

Thumbnail
nbviewer.ipython.org
12 Upvotes

r/IPython • • Apr 30 '13

Roadmap: IPython

Thumbnail
github.com
12 Upvotes

r/IPython • • Feb 04 '23

JupyterLab 3.6 is out with RTC, performance and terminal improvements

11 Upvotes

r/IPython • • Dec 14 '21

Jupyter Games

Thumbnail
blog.jupyter.org
11 Upvotes

r/IPython • • Jun 18 '21

Project Jupyter: A Computer Code that Transformed Science

Thumbnail
hpcwire.com
11 Upvotes

r/IPython • • Sep 08 '20

Custom CSS Style a Jupyter Notebook (self blog)

Thumbnail
skelouse.github.io
11 Upvotes

r/IPython • • Mar 16 '20

Language server protocol extension (linting, navigation, rename) now supports JupterLab 2.0

Thumbnail
github.com
11 Upvotes

r/IPython • • Jun 13 '19

JupyterLab teaches Python developers magic

Thumbnail
opensource.com
11 Upvotes

r/IPython • • Apr 23 '19

Interactive slides in JupyterLab?

11 Upvotes

In the classic Notebook, I was a big fan of RISE, since it let me give interactive presentations (student raises her hand and asks, "What happens if you change X and re-run?") without being impossible to follow the content due to vertical scrolling (each time a cell is evaluated, the content moves up in a way students don't control with hand-eye coordination, and therefore have trouble following with their eyes).

I've been waiting for RISE to come to JupyterLab, but as of last month, that still hasn't happened. So I took matters into my own hands and made a presentation mode as a JupyterLab theme.

It doesn't have the sideways-scrolling animation of Reveal.js, but I never actually wanted that (or the distinction between left-right and up-down). Since I like to incrementally reveal content (not always at the bottom, as "Fragments"), having no transitions at all is ideal—it feels more responsive. The view is also limited to one cell per slide, which required me to change the way I write presentations (moving some content from Markdown into code comments). I'd like to change that, but there's no "previous sibling" selector in CSS3.

The difference between this theme and the cookiecutter I started with is extremely minimal; it's basically one line in index.css:

.jp-NotebookPanel-notebook > .jp-Cell:not(.jp-mod-selected) { display: none; }

Unfortunately, if I open a notebook in this theme, cells are zero-sized unless "jiggled" by resizing the window. I'd like to fix that (don't know how), but right now my workflow is to open notebooks in a standard theme, then switch to this theme. (I also magnify the webpage to 200%. This has been used in several classes, and I like it better than RISE so far!)

I am not an expert in JupyterLab or CSS, and I'm not publishing the theme with all the deficiencies described above. However, is the basic idea interesting? Would anyone like to develop a presentation mode—as a theme, an extension, or a part of JupyterLab's "presentation mode" under the View menu—that shows one or a select few cells at a time?


r/IPython • • Apr 10 '19

A gallery of interesting Jupyter Notebooks: Reproducible academic publications

Thumbnail
scinapse.io
11 Upvotes

r/IPython • • Feb 04 '19

Using Virtual Environments in Jupyter Notebook and Python

Thumbnail
janakiev.com
11 Upvotes

r/IPython • • Dec 23 '18

I've made an extension to JupyterLab: go-to-definition

11 Upvotes

It let's you Alt + click on a variable (function/method/class) to jump to the closest definition (with some simplifications, it does not actually run the code, just parses some keywords). Alt can be replaced with Ctrl or another modifier key in settings.

Here is the link: https://github.com/krassowski/jupyterlab-go-to-definition

I have a feeling that it might not work in some settings, so I would really appreciate feedback from anyone who fancy checking this out.