GET /api/v2/video/307
HTTP 200 OK Vary: Accept Content-Type: text/html; charset=utf-8 Allow: GET, PUT, PATCH, HEAD, OPTIONS
{ "category": "PyCon US 2010", "language": "English", "slug": "pycon-2010--mastering-team-play--four-powerful-ex", "speakers": [ "Raymond Hettinger" ], "tags": [ "bisect", "dequeues", "frozensets", "heapq", "lists", "pycon", "pycon2010", "sets", "sorts", "weakreferences" ], "id": 307, "state": 1, "title": "Mastering Team Play: Four powerful examples of composing Python tools (#184)", "summary": "", "description": "Mastering Team Play: Four powerful examples of composing Python tools\n\n \nPresented by Raymond Hettinger\n\n \nStarts with a quick review of the performance characteristics of major\nindividual tools in Python: bisect, heapq, lists, deques, sets, frozensets,\nclass structures, sorts, and weakreferences. Show how these tools can be\npowerfully combined to create elegant solutions to four hard problems.\n\n 1. Random sampling: when one data structure isn't enough. Discuss how the nature of the problem dictates when to use one of two alternate data structures. \n 2. Ordered dictionaries: with the right compostion of dictionaries, linked lists, and weak references, a dictionary can remember its insertion order without any impact on its big-Oh running times. \n 3. NFA to DFA conversion. The classic, but difficult, algorithm for lexical analysis becomes simple when composing Python's dicts and frozensets. \n 4. Running median: the obvious approaches are horribly slow. The problem centers around how to efficiently maintain sorted data while advancing a large sliding window one value at a time. A list of deques provides a dramatic and scalable improvement in running time. \n\n", "quality_notes": "", "copyright_text": "Creative Commons Attribution-NonCommercial-ShareAlike 3.0", "embed": "", "thumbnail_url": "http://a.images.blip.tv/Pycon-PyCon2010MasteringTeamPlayFourPowerfulExamplesOfComposin150.png", "duration": null, "video_ogv_length": 492820610, "video_ogv_url": "http://05d2db1380b6504cc981-8cbed8cf7e3a131cd8f1c3e383d10041.r93.cf2.rackcdn.com/pycon-us-2010/307_mastering-team-play-four-powerful-examples-of-composing-python-tools-184.ogv", "video_ogv_download_only": false, "video_mp4_length": null, "video_mp4_url": null, "video_mp4_download_only": false, "video_webm_length": null, "video_webm_url": null, "video_webm_download_only": false, "video_flv_length": null, "video_flv_url": null, "video_flv_download_only": false, "source_url": "", "whiteboard": "", "recorded": "2010-02-19", "added": "2012-02-23T04:20:00", "updated": "2014-04-08T20:28:28.153" }