Mor Shonrai

A blog covering everything from programming, data science, astronomy and anything that pops into my head.

Category: python

  • How To Containerize Jupyter Kernels With Docker And Apptainer

    How To Containerize Jupyter Kernels With Docker And Apptainer

    In this tutorial we’ll look at how to use a containerized Jupyter kernel. The first question one might have is why would we want to containerize a Jupyter kernel? We’re often faced with the problem of having complex dependencies that might be difficult to install on ones system. For example, let’s say we’re using Windows…

  • Python Code Optimization: Techniques and Benchmarks

    Python Code Optimization: Techniques and Benchmarks

    Benchmarking and profiling in Python are essential for optimizing code. While delivering functional code is primary, efficiency is secondary but crucial. Premature optimization can be time-wasting. Effective optimization involves setting benchmarks, profiling for performance bottlenecks, and making iterative changes. Libraries like NumPy and tools like Numba’s JIT compilation can significantly enhance performance.