Skip to content

Instantly share code, notes, and snippets.

View KrzysztofCiba's full-sized avatar

Krzysztof Daniel Ciba KrzysztofCiba

View GitHub Profile
@KrzysztofCiba
KrzysztofCiba / ProcessPool.py
Created October 1, 2012 19:27
multiprocessing example
#################################################################
# $HeadURL$
#################################################################
""" :mod: ProcessPool
=================
.. module: ProcessPool
:synopsis: ProcessPool and related classes
ProcessPool
-----------
########################################################################
# $HeadURL $
# File: Traced.py
# Author: Krzysztof.Ciba@NOSPAMgmail.com
# Date: 2012/08/08 13:29:18
########################################################################
""" :mod: Traced
============
.. module: Traced
:synopsis: watched mutable metaclass
@KrzysztofCiba
KrzysztofCiba / TypedList.py
Created October 1, 2012 19:23
one type list
########################################################################
# $HeadURL $
# File: TypedList.py
# Author: Krzysztof.Ciba@NOSPAMgmail.com
# Date: 2012/07/19 08:21:16
########################################################################
""" :mod: TypedList
=======================
.. module: TypedList
@KrzysztofCiba
KrzysztofCiba / Observer.py
Created October 1, 2012 19:22
python observer pattern
########################################################################
# $HeadURL $
# File: Observer.py
# Author: Krzysztof.Ciba@NOSPAMgmail.com
# Date: 2012/09/26 09:39:58
########################################################################
""" :mod: Observer
==============
.. module: Observer
:synopsis: Observer pattern
@KrzysztofCiba
KrzysztofCiba / DynamicProps.py
Created October 1, 2012 19:14
python metaclass with dynamic properties
class DynamicProps( type ):
"""
.. class:: DynamicProps
dynamic creation of properties
"""
def __new__( mcs, name, bases, classdict ):
""" new operator """
def makeProperty( self, name, value, readOnly=False ):
@KrzysztofCiba
KrzysztofCiba / DynamicProps
Created October 1, 2012 19:12
metaclass with dynamic properties
class DynamicProps( type ):
"""
.. class:: DynamicProps
dynamic creation of properties
"""
def __new__( mcs, name, bases, classdict ):
""" new operator """
def makeProperty( self, name, value, readOnly=False ):