[uwsgi]
env=DJANGO_SETTINGS_MODULE
chdir=/home/rs/dev/django/tastyapi/project
module=project.wsgi:application
pidfile=/tmp/project-master.pid
socket=127.0.0.1:8000
home=/home/rs/dev/django/tastyapi/venv
master=true
processes=2
threads=6
harakiri=20
max-requests=5000
vacuum=true
enable-threads=true
#!/bin/env node
def pluck(coll):
coll_keys = {}
for i in coll:
coll_keys.update(i)
new_coll = {}
for i in coll_keys.keys():
new_coll[i] = []
for i in coll:
for j in new_coll:
if j in i:
new_coll[j].append(i[j])
return new_coll
print pluck([
{'Aaa': 1, 'Bbb': 100, 'Ccc': 22, 'Ddd': u'red'},
{'Aaa': 10, 'Bbb': 101, 'Ccc': 0, 'Ddd': u'pink'},
{'Aaa': 0, 'Bbb': 6, 'Ccc': 0, 'Ddd': u'snowwhite'}
])