Jun 27, 2012
apachetop
sudo apachetop -f logs/apache_access.log
Labels:
apache,
apachetop,
performance,
profiling
Install multiple Python versions locally
https://github.com/utahta/pythonbrew - Pythonbrew is a program to automate the building and installation of Python in the users $HOME.
https://github.com/akheron/multipy - Install multiple Python versions locally
https://github.com/akheron/multipy - Install multiple Python versions locally
Labels:
environment,
installer,
python,
python versions,
pythonbrew,
version
Jun 26, 2012
Stackless
Stackless Python is an enhanced version of the Python programming language. It allows programmers to reap the benefits of thread-based programming without the performance and complexity problems associated with conventional threads. The microthreads that Stackless adds to Python are a cheap and lightweight convenience which can if used properly, give the following benefits:
- Improved program structure.
- More readable code.
- Increased programmer productivity.
Labels:
threading
Jun 21, 2012
Data Structures
weakref - module allows the Python programmer to create weak references to objects
Labels:
psl,
standard library
Jun 20, 2012
Multiple Inheritance Best Practices
Multiple inheritance should be avoided: It can be replaced with some
design patterns.
design patterns.
- super usage has to be consistent: In a class hierarchy, super should be used everywhere or nowhere. Mixing super and classic calls is a confusing practice. People tend to avoid super, for their code to be more explicit.
- Don't mix old-style and new-style classes: Having a code base with both results in a varying MRO behavior.
- Class hierarchy has to be looked over when a parent class is called: To avoid any problems, every time a parent class is called, a quick glance at the involved MRO (with __mro__) has to be done.
The common patterns for decorators are:
- Argument checking
- Caching
- Proxy
- Context provider
Labels:
decorator
Jun 18, 2012
Schema-less in Django with Postgres
http://www.craigkerstiens.com/2012/06/14/schemaless-django/
hStore is a column type within Postgres.
hStore is a column type within Postgres.
Labels:
hstore,
nosql,
postgre,
schemaless
Subscribe to:
Posts (Atom)