This file contains 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
>>> import boto | |
>>> boto.__version__ | |
'2.4.0' | |
>>> boto.connect_cloudsearch() | |
Traceback (most recent call last): | |
File "<ipython-input-7-3f612380cada>", line 1, in <module> | |
boto.connect_cloudsearch() | |
File "/Users/sp/.virtualenvs/mem-backend/lib/python2.7/site-packages/boto/__init__.py", line 552, in connect_cloudsearch | |
from boto.cloudsearch.layer2 import Layer2 | |
ImportError: No module named cloudsearch.layer2 |
This file contains 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
def unpacked(callback): | |
"""Decorator to unpack responses before passing the result to a callback. | |
""" | |
@functools.wraps(callback) | |
@tornado.stack_context.wrap | |
def unpacking_callback(response): | |
callback(mdp.unpack_response(response)) | |
return unpacking_callback | |
This file contains 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
urlpatterns = pattern('physiology.views', | |
menu('phys_and_medication', | |
submenu('medicine', url(r'^medicine/$', ...)), | |
submenu('phys', url(r'^something/$', ...)), | |
submenu('phys', url(r'^something-else/$', ...)), | |
), | |
) |
This file contains 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
$ java -version | |
java version "1.6.0_29" | |
Java(TM) SE Runtime Environment (build 1.6.0_29-b11-402-11D50b) | |
Java HotSpot(TM) 64-Bit Server VM (build 20.4-b02-402, mixed mode) |
This file contains 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
plans: [{id: 1, ...}, {id: 2, ...}] | |
meals: [{plan: 1, ...}, {plan: 1, ...}] | |
workouts: [{plan: 1, ...}, {plan: 1, ...}] | |
istället för | |
plans: [{id: 1, meals: [...], workouts: [...]}, ...] |
This file contains 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 Foo(object): | |
def to_json(self): | |
return json.dumps(self, cls=MongoEncoder) |
This file contains 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
2 gustaf | |
3 henke | |
1 pontus |
This file contains 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
I was at Amazon for about six and a half years, and now I've been at | |
Google for that long. One thing that struck me immediately about the | |
two companies -- an impression that has been reinforced almost daily -- | |
is that Amazon does everything wrong, and Google does everything right. | |
Sure, it's a sweeping generalization, but a surprisingly accurate one. | |
It's pretty crazy. There are probably a hundred or even two hundred | |
different ways you can compare the two companies, and Google is superior | |
in all but three of them, if I recall correctly. I actually did a | |
spreadsheet at one point but Legal wouldn't let me show it to anyone, | |
even though recruiting loved it. |
This file contains 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
# deb cdrom:[Ubuntu 10.10 _Maverick Meerkat_ - Release amd64 (20101007)]/ maverick main restricted | |
# See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to | |
# newer versions of the distribution. | |
deb http://se.archive.ubuntu.com/ubuntu/ natty main restricted | |
deb-src http://se.archive.ubuntu.com/ubuntu/ natty main restricted | |
## Major bug fix updates produced after the final release of the | |
## distribution. | |
deb http://se.archive.ubuntu.com/ubuntu/ natty-updates main restricted |
This file contains 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
coach_models = [ | |
(health.models.HealthMessage, health.search_indexes.HealthMessageIndex), | |
(django.contrib.auth.models.User, health.search_indexes.UserIndex), | |
] | |
coach_site = haystack.sites.SearchSite() | |
coach_indexes = {} | |
def setup_signals(model): | |
index = coach_site.get_index(model) |