Using Python's built-in defaultdict we can easily define a tree data structure:
def tree(): return defaultdict(tree)That's it!
Using Python's built-in defaultdict we can easily define a tree data structure:
def tree(): return defaultdict(tree)That's it!
| <?php | |
| /** | |
| * Scrape the number of podcast reviews from iTunes for all country specific storefronts. | |
| * | |
| * @author Sean Murphy <[email protected]> | |
| */ | |
| $podcast_id = '366931951'; // Startups For the Rest of Us | |
| //$podcast_id = '318567721'; // techzing |
| from django.db import models | |
| from django.core.exceptions import ValidationError | |
| from django.forms import ModelForm | |
| class CleanModel(models.Model): | |
| """ Abstract class that adds field validations """ | |
| def clean_fields(self, exclude): | |
| errors = {} |
| import tornado.ioloop | |
| import tornado.web | |
| import tornado.httpserver | |
| import tornado.httputil | |
| import tempfile | |
| class MainHandler(tornado.web.RequestHandler): | |
| def put(self): | |
| filename = self.request.body.name | |
| # do stuff with the image |