jupyter

15
Jul

Making An Evil Jupyter Notebook

I recently came back to an idea I started playing with back in January: sticking a game into the Jupyter notebook interface. The key problem to solve here is that, while Jupyter is designed to run the code you see and explain it, for game purposes I want the code to do the opposite: control the interface itself (and do so while being at least lightly obfuscated from the user).

Adding, Running, and Removing Cells With IPyLab

IPyLab has been a great (and really fun) tool for this purpose. You can use it to execute Jupyter app commands directly within

Read more
2 min read
29
Jan

Programmatically Creating Styled Cells In Jupyter Notebooks

I've been playing around with the idea of using Jupyter notebooks as a narrative game interface for a while, and finally got around to doing some prototyping this week. One thing I really wanted to do was require users to run code cells in Jupyter to unlock story beats: Jupyter notebooks are usually presented as a step-by-step tutorial, which is perfectly fine if you're trying to teach someone how to run a linear regression in sklearn but less so if you're trying to build suspense over the course of a story.

It's pretty easy to get output from just running

Read more
3 min read