Async Python Part 2 – A deeper look

This article was originally published in Acadamia Sinica's LSL Blog. Background In the previous article we demonstrated with an example how asynchronous code can achieve massive scalability with the same hardware resources compared to a threaded model. In this example we would go a little bit deeper into async programming …

Async Python - Part 1

This article was originally published in Acadamia Sinica's LSL Blog. Introduction In the previous article on Python Generators we saw how generator functions are essentially objects that represent the function, execution of which can be suspended and resumed. The resumption of the function happens when it has new values to …

Python Generators - A Look Inside

This article was originally published in Acadamia Sinica's LSL Blog. Background One of the most powerful features of Python is its generator functions. It also happens to be a feature that leads to confusion among its users; it can seem quite mysterious as to how generators do their magic. A …

Brief Overview of Pelican

Recently I switched this website from Django to a static site. This article gives an overview of the core concepts of Pelican, covering areas that are not directly captured in the official docs. This is written primarily to solidify my own understanding and also act as a reference for myself …

How to Create a Random String

Random strings are used everywhere in computing -- mostly as keys for cryptographic signing sensitive data. So how does one go about creating one? My first thinking was to use Python code and its random library. I came up with this import string import random def gen_random_string(length=32, charset=string …