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
d3.select('.target_el') | |
.text('hello') // works, sets the text of .target_el to hello | |
.append('p') // appends <p> to <body> instead of .target_el |
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
video: | |
v[RXqSedWSu2k] | |
{question}[8] | |
{discussion}[795] | |
{demo}[797] | |
{schoolyourself}[1] |
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
trees = course_pack.trees.all().values_list('data', flat=True) |
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
job = group(tq_make_notification_for_user_range(i,i+1000) for i in range(1, user_count, 1000)) | |
job.apply_async() |
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 MyResource(ModelResource): | |
list_only_field = fields.CharField('list_this_attr', use_in='list') | |
detail_only_field = fields.CharField('detail_this_attr', use_in='detail') | |
both_field = fields.CharField('always_attr') # use_in='all' by default |
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
[('id', '20010911080409a'), | |
('time', '52163.3363310185'), | |
('exposure', '20'), | |
('ra', '20.011935'), | |
('dec', '-7.63364'), | |
('ra0', '19.915845'), | |
('dec0', '-7.53'), | |
('nx', '4080'), | |
('ny', '4080'), | |
('sequence', '0'), |
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
var CourseMembership = Backbone.Model.extend({ | |
// ... | |
toJSON: function () { | |
var attrs = _.clone(this.attributes); | |
if (_.isObject(attrs.course)) { | |
attrs.course = attrs.course.url(); | |
} | |
return attrs; | |
}, | |
// ... |
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 MyBaseResource(ModelResource): | |
# a resource class that dynamically limits fields | |
def full_dehydrate(self, bundle): | |
# Dehydrate each field. | |
for field_name, field_object in self.limit_fields(bundle): | |
# ... | |
# ... | |
def limit_fields(self, bundle): |
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
''' | |
API V2 | |
Focus on: | |
- Minimalistic interfaces | |
- Simple authorization types | |
- NO full=True EVER | |
- NO use of request.user.current_course | |
- Full unit test coverage |
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
Germanic Language Word for element "Na" | |
----------------- --------------------- | |
German | Natrium | |
Icelandic | Natríum | |
Dutch | Natrium | |
Norwegian | Natrium | |
Swedish | Natrium | |
English | Sodium |