Here are some of the most recently published snippets!
Lock and synchronization in python
This example shows how to deal with lock in python parallel programming.
Here we want to calculate the disk occupancy for a given directory in Linux OS, evaluating the disk occupancy for any subdirectory using threads.
Note the usage of lock mechanism to ensure atomic operation on the total sum.
Open the snippet
Author: lbottaro
Factory
A toy example for the factory design pattern
Open the snippet
Author: mprisznyak