Mor Shonrai

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

  • Creating and Modifying Images with Apptainer

    Creating and Modifying Images with Apptainer

    Apptainer, formerly Singularity, allows containerization, letting applications run in controlled environments without affecting the host OS. Favored in high-performance computing (HPC) due to superior security, it supports image modification, custom image creation via sandboxes and definition files, and efficient preexisting image integration. Apptainer images are notably smaller compared to Docker, enhancing storage efficiency.

  • 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.

  • Rust Tutorial Part III

    Rust Tutorial Part III

    In this tutorial we’ll start dealing with more advanced topics in Rust, specifically moving towards an object orientated programming approach. By the end of this tutorial you’ll understand how to make “objects” in Rust using structs. You’ll learn how to make generic and flexible structs and functions using generic types. You’ll also learn how to…

  • Rust Tutorial Part II

    Rust Tutorial Part II

    In post we’ll dig deeper into Rust programming, focusing on functional programming and controlling flow. For this we’ll introduce concepts such as functions, closures, if statements, match statements, for and while loops. Functional Programming In Rust, functional programming can be achieved through two primary methods: using functions defined with the fn keyword or leveraging closures….

  • Rust Tutorial Part I

    Rust Tutorial Part I

    This tutorial was part of a workshop I gave to graduate level astronomy students in the run up to the 2023 Advent of Code. The idea of this tutorial wasn’t to teach the nitty gritty of the Rust language, but rather to get someone who is somewhat experienced with programming, familiar enough with Rust to…

Ste O’Brien

Blogging into the abyss


Want to reach out? See the contact page.