Uploaded November 2018 | Updated September 2026, 1 day ago
Moshe Zadka
2018.northbaypython.org/schedule/presentation/7
# Jupyter Basics (7m)
Jupyter is an interactive development environment based on the read-edit-eval loop. We will examine a bit of its history, and show-case how it works for those new to Jupyter -- while also showing a few tricks even experienced Jupyterians will appreciate.
# Incremental Development (7m)
Next we will discuss best practices for incremental development. Incremental development is slightly different from writing code in Python modules. The global namespace matters a lot more, and must be managed carefully. Writing code with less side-effects allows using the same data structure multiple times, increasing iteration speed. Finally, it is often useful to write little snippets which will crawl intermediate results and verify them for correctness.
# Collaboration (7m)
There are things to keep in mind when collaborating with Jupyter notebooks. Since they are edited by an automatic tool, they can often accumulate "cruft" which confuses version control systems. Having utilities for cleaning notebooks pre-commit, as well as linting them in a continuous integration environment post-commit, allows managing such cruft, and getting usable, reviewable, diffs. It is useful, as well, to be able to "run" notebooks in continuous integration, verifying correctness.
# Production (7m)
If we develop our code in Jupyter, we need to somehow get it to run in production. Luckily, modern Python import machinery is flexible enough that we can write packages that look, to the users, like regular Python code. We will cover how to mark cells appropriately as "tests" or "code", and how to set up such machinery -- all the way to building PyPI-ready wheels.
# Summary (2m)
If we recognize that writing code is a process of successive approximation, we can stop having "IDE-envy" of static languages with all their facilities and develop *with* the Python grain: interactively, using the dynamicity to make the programming environment better, not worse.
A Python conference north of the Golden Gate
North Bay Python is a single-track conference with a carefully curated set of talks representing the diverse Python community and their different areas of interest.
If a topic is less to your interest, or you've met some people you really want to sit down and chat with, we'll have plenty of areas away from the main theatre to catch up and chat.
Our goal is to keep prices as low as possible. That means we won't be catering lunch. Instead, you can look forward to extra-long lunch breaks you can use to explore all of the great food options around the venue.
Moshe Zadka
2018.northbaypython.org/schedule/presentation/7
# Jupyter Basics (7m)
Jupyter is an interactive development environment based on the read-edit-eval loop. We will examine a bit of its history, and show-case how it works for those new to Jupyter -- while also showing a few tricks even experienced Jupyterians will appreciate.
# Incremental Development (7m)
Next we will discuss best practices for incremental development. Incremental development is slightly different from writing code in Python modules. The global namespace matters a lot more, and must be managed carefully. Writing code with less side-effects allows using the same data structure multiple times, increasing iteration speed. Finally, it is often useful to write little snippets which will crawl intermediate results and verify them for correctness.
# Collaboration (7m)
There are things to keep in mind when collaborating with Jupyter notebooks. Since they are edited by an automatic tool, they can often accumulate "cruft" which confuses version control systems. Having utilities for cleaning notebooks pre-commit, as well as linting them in a continuous integration environment post-commit, allows managing such cruft, and getting usable, reviewable, diffs. It is useful, as well, to be able to "run" notebooks in continuous integration, verifying correctness.
# Production (7m)
If we develop our code in Jupyter, we need to somehow get it to run in production. Luckily, modern Python import machinery is flexible enough that we can write packages that look, to the users, like regular Python code. We will cover how to mark cells appropriately as "tests" or "code", and how to set up such machinery -- all the way to building PyPI-ready wheels.
# Summary (2m)
If we recognize that writing code is a process of successive approximation, we can stop having "IDE-envy" of static languages with all their facilities and develop *with* the Python grain: interactively, using the dynamicity to make the programming environment better, not worse.
A Python conference north of the Golden Gate
North Bay Python is a single-track conference with a carefully curated set of talks representing the diverse Python community and their different areas of interest.
If a topic is less to your interest, or you've met some people you really want to sit down and chat with, we'll have plenty of areas away from the main theatre to catch up and chat.
Our goal is to keep prices as low as possible. That means we won't be catering lunch. Instead, you can look forward to extra-long lunch breaks you can use to explore all of the great food options around the venue.





 is a tool that packages Python code and dependencies into a single file. It provides various features such as determinism (given the same input files, you get a bit-for-bit identical output file), isolation (a PEX file runs in the bundled environment, isolated from the system’s site-packages), composition (multiple PEX files can be combined to form new environments), and more. We used a number of these feature to great effect in our solution. By using PEX in addition to Docker we were able to reduce the time a developer waits for code to deploy from 3-4 minutes to about 30 seconds.
Shipping code isnt the only use for PEX. Once we see how PEX files work, we will also go over a few fun tips and tricks that are handy for everyday Python development.
North Bay Python is a boutique one-track conference, held in Petaluma, California. Our first events were held in 2017-2019 in a 100 year-old theater in the citys downtown. After a planned one-year break thats turned into almost four years, were excited to return!
This year, were holding our conference in July, in a barn, on a ranch overlooking the Petaluma River.
Produced by NDV: https://youtube.com/channel/UCQ7dFBzZGlBvtU2hCecsBBg?sub_confirmation=1
Sat Jul 29 14:40:00 2023 at Reis River Ranch Ship your Python code faster with PEX - Shalabh Chaturvedi (North Bay Python 2023)](https://i.ytimg.com/vi/pyRwQByuFfc/mqdefault.jpg)




