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
source "http://rubygems.org" | |
gem "jammit" | |
gem "closure-compiler" |
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
multipled = [3 * s for s in series] |
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) |
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
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
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
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
$ 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
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
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 | |