geekdarling.ch - Matching algorithm

Hey folks
Since the GPLed dating platform code out there is crappy PHP work and not suited to help geeks meet each other either, I started designing a new matching algorithm in course of the rewrite of geekdarling.ch as a Ruby application.
Basically the idea is quite easy. First I travel the bipartite tree and cut it into subtrees matching the basic requirement of matching sexual orientation and this way saving CPU power by checking for bidirectional preferences.

Second step: I will then value additional attributes based on a two way connection and average the weight of every forth and back arrow.

For the example on the upper graphics that would mean: R=(((6+1)/2)+((3+4)/2)+0)/3=2.3
Illuminated! ;-)

Another practical example: Let's say I choose under "preferred editor" select that it's absolutely important to me that my partner like vim too, then anyone who likes vim as well will be given 100 additional points when being weighted in our matching algorithm, and so all the vim using geek girls are listed first (followed by the emacs users ;-)).

I'm not quite done yet, but that's where I'm going :-)
Please gimme feedback.

sending HTML emails with inline images attached

#! /usr/bin/python
# -*- coding: utf-8 -*-
import smtplib
from email.mime.multipart import MIMEMultipart
from email.mime.text import MIMEText
from email.mime.image import MIMEImage
from email.header import Header
 
def sendEmail(you,greatingLine):
        # me == my email address
        # you == recipient's email address
        me = "VFSN Praesident <praesident @vfsn.ch>"
 
        # Create message container - the correct MIME type is multipart/alternative.
        #msg = MIMEMultipart('alternative')
        msg = MIMEMultipart('related')
        msg['Subject'] = Header("Verein Flugschneise Süd - NEIN","utf-8")
        msg['From'] = me
        msg['To'] = you
 
        # Create the body of the message (a plain-text and an HTML version).
        f = open('Mail_4.html', 'r')
        mail_content = f.read()
        f.close()
        mail_content = mail_content.replace('%Anrede%',greatingLine)
        mail_content = mail_content.replace('vfsn.gif','cid:vfsn.gif')
        html = mail_content
 
        # Record the MIME types of both parts - text/plain and text/html.                                                                                                                       
        part2 = MIMEText(html, 'html')                                                                                                                                                          
 
        part3_data = open('vfsn.gif', 'rb').read()                                                                                                                                              
        part3 = MIMEImage(part3_data, 'gif')                                                                                                                                                    
        part3.add_header('Content-ID', '<vfsn .gif>')                                                                                                                                            
        part3.add_header('Content-Disposition', 'attachment', filename='vfsn.gif')
        part3.add_header('Content-Disposition', 'inline', filename='vfsn.gif')
 
        part4_data = open('Bauverbot im Sueden_2_LQ.pdf', 'rb').read()
        part4 = MIMEImage(part4_data, 'pdf')
        part4.add_header('Content-Disposition', 'attachment', filename='Bauverbot im Sueden_2_LQ.pdf')
        part4.add_header('Content-Disposition', 'inline', filename='Bauverbot im Sueden_2_LQ.pdf')
 
        # Attach parts into message container.
        # According to RFC 2046, the last part of a multipart message, in this case
        # the HTML message, is best and preferred.
        msg.attach(part2)
        msg.attach(part3)
        msg.attach(part4)
 
        # Send the message via local SMTP server.
        s = smtplib.SMTP('localhost')
        # sendmail function takes 3 arguments: sender's address, recipient's address
        # and message to send - here it is sent as one string.
        s.sendmail(me, you, msg.as_string())
        s.quit()
 
csv = open('Adressen_4.csv','r').read()
for line in csv.split('\n')[1:]:
        lineArray=line.split(',')
        try:
                ret=lineArray[7]+" "+lineArray[4]+" "+lineArray[5]
                ret=ret.strip()
                if ret=="":
                        ret=False
        except:
                ret=False
 
        Anrede=ret
 
        try:
                ret=lineArray[12]
                ret=ret.strip()
                if ret=="":
                        ret=False
        except:
                ret=False
 
        Mail = ret
 
        if Mail and Anrede:
                print 'Sending to '+Mail+' with rcp message '+Anrede
                try:
                        sendEmail(Mail,Anrede)
                except:
                        continue
</vfsn></praesident>

openerp on CentOS-6 (with RPM)

Howdy
First fit the package depencies like described here: http://gurn3ys.tuxfamily.org/?p=65
Somehow the installation prefix of the RPMs from the daily build service(http://nightly.openerp.com/7.0/nightly/rpm/) points to /usr/local which is... unhandy
The solution is to overwrite some rpm macros which check for unpacked files...
echo "%__os_install_post %{nil}" >> ~/.rpmmacros
And then installing and rebuilding the srpm with rpmbuild -ba

Mein potentielles schlechte Laune Ablassventil