Skip to content

Instantly share code, notes, and snippets.

View emr-arvig's full-sized avatar

Evan Roggenkamp emr-arvig

  • Arvig
View GitHub Profile
@rogueinkamp
rogueinkamp / creation_factory.py
Last active October 9, 2019 00:51
Dynamic class creation using python
from abc import ABC, abstractmethod
from beeprint import pp
"""
There may be a better more pythonic way of doing this,
I am not sure.
I spent a few days trying variuous methods and this was what worked the best
and was the most easy to understand and implement.
There are probably only a few use cases where this is needed.
@albertz
albertz / TaskSystem.py
Last active September 24, 2019 15:31
Multiprocessing with real subprocess (fork+exec), not just fork
"""
Here are all subprocess, threading etc related utilities,
most of them quite low level.
"""
from threading import Lock, currentThread
import sys
import os
from StringIO import StringIO