Category: Hacking

January 6, 2012 : Experiments in Internet Radio Transmission

Last year before the Doo Dah Parade in Pasadena, California we at Poo-Bah Records setup a live radio transmission to broadcast what is playing in store, and to start doing live shows. We had an iMac computer donated to us…

Categories: Hacking

February 28, 2011 : InDefero — Code Hosting and Project Management

While at SCaLE 9x this last weekend I went to a talk on “Behind the Scenes of Google Code Project Hosting”. I had previously just discovered InDefero, a project that started out as using a similar user interface but is…

Categories: Hacking

December 4, 2008 : Python Performance Part 3: Python 3000 and Transforming Large Lists into Seperate Smaller Lists

Preface This is a redux of Python Performance Part 1, where the fastest method was using the reduce builtin function in Python2.5. December 3rd, Python 3000 final was released so I have downloaded it and gone over some of these…

Categories: Hacking
Tags: Python

June 17, 2008 : Python Performance Part 2 Redux: Split & Reduce Large Strings for ‘A Href’ Hypertext

split_2.py def get_value(a): return a[1:a.find(">")-1] hrefs = map(get_value,open(“hypertext.html”,”r”).read().split(“<a href=”)) Timing Comparison: ~ 300% Performance Improvement Note: hypertext.html is 48MB. braydon@bgf:~/python_tests/extract$ time python split.py real 0m1.263s user 0m1.112s sys 0m0.156s braydon@bgf:~/python_tests/extract$ time python split_2.py real 0m0.392s user 0m0.268s sys 0m0.120s split.py…

Categories: Hacking
Tags: Python

June 16, 2008 : Python Performance Part 2: Parsing Large Strings for ‘A Href’ Hypertext

Goal Write a fast Python script that will take a large string and reduce it to a list of all of the hyperlinks in the html string; such as [”http://world.org”,”/tree”]. Attempt 1: Self-Recursion f = open(‘hypertext_sm.html’,'r’) ahrefs = [] count…

Categories: Hacking
Tags: Python

June 14, 2008 : Python Performance Part 1: Transforming Large Lists into Seperate Smaller Lists

Goal Write a fast Python script that will take a large list and break it up into smaller sub-lists based on a set size; such as transforming [a,b,c,d,e,f] into [[a,b],[c,d],[e,f]]. Attempt 1: Map/Reduce (0.93s) #import a list of 247,213 integers…

Categories: Hacking
Tags: Python

January 3, 2008 : The Importance in Rewriting Code

I needed a way of translating “644″, an object permission setting, into something more readable. I wanted to be able to do the following: def determinePermissions(obj): obj_usr= {“owner”:obj.owner, “group”:obj.group, “everyone”:True} usr = { “owner”:cherrypy.session.get(‘user’), “group”:cherrypy.session.get(‘group’), “everyone”:True } perms = self.translatePermissions(obj)…

1 Comment
Categories: Hacking

News Calendar

May 2012
M T W T F S S
« Apr    
 123456
78910111213
14151617181920
21222324252627
28293031  

Information