This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
Flatten a nested list structure. | |
* Works for nested structures of lists, tuples, generators, or any other iterable. | |
* Special-cases string types and treats them as non-iterable. | |
* Is not limited to the system recursion limit. | |
* Yields items from the structure instead of constructing a new list, and can | |
work on non-terminating generators. | |
This is basically a non-recursive version of the following: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
django-mingus | |
django-ratings | |
django-ajax-validation | |
django-google-analytics | |
django-mailer |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from fabric.api import env, run, sudo, local, put | |
def production(): | |
"""Defines production environment""" | |
env.user = "deploy" | |
env.hosts = ['example.com',] | |
env.base_dir = "/var/www" | |
env.app_name = "app" | |
env.domain_name = "app.example.com" | |
env.domain_path = "%(base_dir)s/%(domain_name)s" % { 'base_dir':env.base_dir, 'domain_name':env.domain_name } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
======================= buildout.cfg ======================= | |
[buildout] | |
unzip = true | |
develop = . | |
eggs = | |
ws_ha_transitory | |
ipython | |
ipdb | |
MySQL-Python | |
docutils |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class MyMax(Aggregate): | |
sql_function = 'CHAR_LENGTH' | |
"""A base class to make it easy for end users to define their own | |
custom SQL aggregates. | |
The subclass should define the following two class properties: | |
* sql_function - the name of the SQL function to invoke | |
Optionally, you can define | |
* sql_template - a format string that is used to compose the |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ּ_בּ | |
בּ_בּ | |
טּ_טּ | |
כּ‗כּ | |
לּ_לּ | |
מּ_מּ | |
סּ_סּ | |
תּ_תּ | |
٩(×̯×)۶ | |
٩(̾●̮̮̃̾•̃̾)۶ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
# -*- coding: utf-8 -*- | |
set( | |
fab_hosts = ['host.com'], | |
fab_user = 'user', | |
server_path = '/home/user/django/apache2/bin', | |
project_path = '/home/user/django/project', | |
memcached_ip = 'IP', | |
memcached_port = 'PORT', |
NewerOlder