I just finished and launched a “razor blade” application for Mochilla to randomly choose subscribers to win tickets for the VTech/Mochilla Arthur Verocai Show this next Friday the 18th. It was a quick turn around of three days, and is an integration with their existing software for their website, more details about that to follow. [...]
We just got up a new events section for Mochilla.com. I added a ‘date’ column to the existing documents mysql table and an interface to be able to add/edit events via the browser. It took about a day and half to complete.
I just spent the last two days optimizing the Python backend for the Mochilla.com website. We are running the website on a 256MB VPS at Slicehost. They have been getting a larger number of hits the last week because of their new Timeless video they are releasing, and several people have been embedding the videos [...]
We just got up a new landing page, and product page for the Timeless Concert Series new Box-Set to be released soon. It was a quick turn-around of about 2 days from initial call to having the new page up. This work included, setting up a development site, modifying an already existing template file, and [...]
Title: Zine Featured Posts Plugin
Client: DUBLAB
Date: February 2009
Languages: Python and JavaScript
Description: A plugin for Zine to be able to select posts to feature and give them order.
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 scripts again. In Python 3000 the reduce function is no longer a builtin, and has moved [...]
INTOINFINITY.ORG
Title: Into Infinity
Client: Creative Commons & DUBLAB
Date: August 2008
Languages: Python and JavaScript
Description: An online exhibition of audio and visual artwork with many permutations.
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
Previously, I had found [...]
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 = []
def find_ahref(h):
a = h.find(“<a href=”)
if a != -1:
[...]
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
from oids import oids
def pre(a):
return (list(), a, 0)
def make_sets(a,b):
set_size = 8
[...]
© Fuller Web Development. Powered by WordPress using the DePo Skinny Theme.