Green threads

Green threads

Green threads are execution threads that are managed by a virtual machine (VM) instead of the operating system.  Green threads emulate a multi-threaded environment without …

Xor0x
1 min read
Continue Reading
Shallow Copying

Shallow Copying

Object copying can be performed as either "shallow" copying or "deep" copying. The difference between them lies in how nested objects are handled. In shallow …

Xor0x
1 min read
Continue Reading
NetworkX

NetworkX

NetworkX is a Python library for analyzing complex networks. It provides data structures for working with graphs (networks) and implements many algorithms for network data …

Xor0x
1 min read
Continue Reading
Asynchronous code

Asynchronous code

Asynchronous code is an approach to writing code that allows multiple tasks to be executed simultaneously within a single process. This is achieved through the …

Xor0x
1 min read
Continue Reading
Protocols

Protocols

The terms "iterator protocol" or "descriptor protocol" are already familiar and have been used for a long time. However, now protocols can be described in …

Xor0x
1 min read
Continue Reading
Singleton design pattern

Singleton design pattern

class Singleton: instance = None def __new__(cls): if cls.instance is None: cls.instance = super().__new__(cls) return cls.instance a = Singleton() b = Singleton() print(a is b) …

Xor0x
1 min read
Continue Reading