#Query
# group by, count and sort
Model.objects.values('ingredient','category').annotate(count=Count('ingredient')).order_by('-count')
#Query
# group by, count and sort
Model.objects.values('ingredient','category').annotate(count=Count('ingredient')).order_by('-count')
# dictionary comprehension
d = { k:v for k,v in collection }
#output with no newline
sys.stdout.write('.')
# dictinary iteration
for k, v in d.iteritems()
# parse string to date
datetime.datetime.strptime('07/04/2014','%d/%m/%Y').date()
ARCHFLAGS=-Wno-error=unused-command-line-argument-hard-error-in-future pip install