Another short post on pybind11 and how you can leverage its call guard directives to release the GIL and achieve true multithreaded parallellism in python.
Recently, I’ve been writing some C-extensions to speed up some performance critical code in Python and while trying to setup pybind11 on a project managed with Poetry I realized there was no clear documentation on how to setup the build process correctly. Here’s a short write-up as in how to sort it out.
Reproducible python environments can be tricky, especially so when your codebase requires external non-python dependencies that need to be installed outside your virtualenv. Docker is the defacto tool to solve this problem nowadays but, if your workflow requires access to specific hardware resources such as GPUs, things get a bit more complicated. In this post I cover my approach to repeatable environments with GPU support and a minimum amount of external setup.
Do you like using Jupyter notebooks to explore your data but feel that it looks raw to be presentation worthy? Would you like being able to share interactive visualizations to colleagues and stakeholders with minimal fuss? In this post I’ll show my approach to generating static reports with interactive plots. Powered by Altair and nbconvert.
This is my recipe to install Ubuntu 19.04 Disco Dingo on the Lenovo Thinkpad X1 Carbon 6th gen (2018). This guide should serve you as well for Ubuntu 18.04 LTS, but the newer kernel and GNOME on 19.04 offer better power management and HiDPI support. The X1 Carbon is an excellent laptop for developers, and even though its Linux support is good, getting it to work perfectly still requires some tinkering.
This is how I’ve setup my Thinkpad X1 Carbon with functional fractional scaling support on Ubuntu 19.04. Hopefully this post serves as a beacon for everyone wanting a way out of the current buggy mess that is fractional scaling on Linux. The only limitation of this solution is that it doesn’t support dual monitors with different DPI settings. External monitors work well, as long as the laptop screen is closed. This solution should work on any laptop with a high resolution screen. Most of this information is not specific to Ubuntu either, just GNOME. Still, some of the package names or locations for config files will probably be different in your distro.