<?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>Naufraghi nella rete &#187; python</title>
	<atom:link href="http://www.slug.it/naufraghi/tag/python/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.slug.it/naufraghi</link>
	<description>… dolce m’è il naufragar in questo mare?</description>
	<lastBuildDate>Fri, 03 Feb 2012 16:10:55 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
<meta xmlns="http://www.w3.org/1999/xhtml" name="robots" content="noindex,follow" />
		<item>
		<title>F2PY rulez!</title>
		<link>http://www.slug.it/naufraghi/f2py-rulez/</link>
		<comments>http://www.slug.it/naufraghi/f2py-rulez/#comments</comments>
		<pubDate>Sun, 23 Jan 2011 18:37:36 +0000</pubDate>
		<dc:creator>Matteo</dc:creator>
				<category><![CDATA[Generale]]></category>
		<category><![CDATA[fortran]]></category>
		<category><![CDATA[informatica]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[software libero]]></category>

		<guid isPermaLink="false">http://www.slug.it/naufraghi/?p=567</guid>
		<description><![CDATA[I recently found some old Fortran code from the paper Algorithm AS197 A Fast Algorithm for the Exact Likelihood of Autoregressive-Moving Average Models (Melard 1984) [pdf] [code]. I&#8217;m not very fluent in Fortran77 and I don&#8217;t like the idea of &#8230; <a href="http://www.slug.it/naufraghi/f2py-rulez/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I recently found some old Fortran code from the paper <em>Algorithm AS197 A Fast Algorithm for the Exact Likelihood of Autoregressive-Moving Average Models (Melard 1984)</em> [<a href="http://www.stat.berkeley.edu/classes/s244/as197.pdf">pdf</a>] [<a href="http://lib.stat.cmu.edu/apstat/197">code</a>].</p>
<p>I&#8217;m not very fluent in Fortran77 and I don&#8217;t like the idea of rewriting a well tested piece of code introducing new bugs, so why not give a try to <a href="http://www.scipy.org/F2py">F2PY</a>?</p>
<blockquote><p>F2PY is a tool that provides an easy connection between Python and Fortran languages. F2PY is part of <a href="http://www.scipy.org/NumPy">NumPy</a>.<br />
F2PY creates extension modules from (handwritten or F2PY generated) signature files or directly from Fortran sources.</p></blockquote>
<p><a href="http://www.slug.it/naufraghi/ingegneria/interface-legacy-fortran-code-from-python-with-f2py/">Continue&#8230;</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.slug.it/naufraghi/f2py-rulez/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Naive k-means in python</title>
		<link>http://www.slug.it/naufraghi/naive-k-means-in-python/</link>
		<comments>http://www.slug.it/naufraghi/naive-k-means-in-python/#comments</comments>
		<pubDate>Wed, 15 Sep 2010 21:03:07 +0000</pubDate>
		<dc:creator>Matteo</dc:creator>
				<category><![CDATA[Generale]]></category>
		<category><![CDATA[machine-learning]]></category>
		<category><![CDATA[python]]></category>

		<guid isPermaLink="false">http://www.slug.it/naufraghi/?p=506</guid>
		<description><![CDATA[k-means is a basic algorithm for clustering. Here a naive implementation in python: k-means clustering (naive)]]></description>
			<content:encoded><![CDATA[<p><strong>k</strong>-means is a basic algorithm for clustering. Here a naive implementation in python: <a title="k-means clustering (naive)" href="http://www.slug.it/naufraghi/ingegneria/k-means-clustering-naive/">k-means clustering (naive)</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.slug.it/naufraghi/naive-k-means-in-python/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Dietro Dive Into Python 3</title>
		<link>http://www.slug.it/naufraghi/dietro-dive-into-python-3/</link>
		<comments>http://www.slug.it/naufraghi/dietro-dive-into-python-3/#comments</comments>
		<pubDate>Mon, 02 Feb 2009 09:04:27 +0000</pubDate>
		<dc:creator>Matteo</dc:creator>
				<category><![CDATA[Generale]]></category>
		<category><![CDATA[informatica]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[società]]></category>

		<guid isPermaLink="false">http://www.slug.it/naufraghi/?p=311</guid>
		<description><![CDATA[Oggi ho notato il sito diveintopython3.org. Incuriosito dal footer: This site is optimized for Lynx just because fuck you. I’m told it also looks good in graphical browsers. © 2001-4, 2009 ℳark Pilgrim, CC-BY-3.0 Sono andato a guardare nei sorgenti &#8230; <a href="http://www.slug.it/naufraghi/dietro-dive-into-python-3/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Oggi ho notato il sito <a href="http://diveintopython3.org/">diveintopython3.org</a>.</p>
<p>Incuriosito dal footer:</p>
<blockquote><p><em>This site is optimized for Lynx just because fuck you.<br />
I’m told it also looks good in graphical browsers.</em><br />
© 2001-4, 2009 <a type="amzn" search="Mark Pilgrim Python">ℳark Pilgrim</a>, CC-BY-3.0</p></blockquote>
<p>Sono andato a guardare nei sorgenti della pagina ed ho trovato questa interessante riflessione:</p>
<div class="codesnip-container" >
<p>&lt;!-<span>-</span> As I write this, the year is 2009, and the internet is STILL a battleground of so-called &#8220;intellectual property&#8221; disputes.  Some people would have you believe that without proper financial incentives, music, literature, and software would disappear.  After all, who would make music if they can&#8217;t make money on it?  Who would write?  Who would program?
</p>
<p>
I know the answer.  The answer is that musicians will make music, not because they can make money, but because musicians are the people who can&#8217;t not make music.  Writers will write because they can&#8217;t not write.  Most of the people you think of as artists are really just showmen.  They collect a paycheck and go home at 5 o&#8217;clock.  That&#8217;s not art, that&#8217;s commerce.
</p>
<p>
I&#8217;ve been programming since 1983 and releasing my code under Free Software licenses since 1993.  I&#8217;ve been writing and publishing under Free Content licenses since 2000.  I can&#8217;t imagine not doing this.  If you can imagine yourself not doing what you&#8217;re doing, do something else.  Do whatever it is you can&#8217;t not do. <span>-</span>-&gt;</p>
</div>
]]></content:encoded>
			<wfw:commentRss>http://www.slug.it/naufraghi/dietro-dive-into-python-3/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>iPhone TPM? Linguaggi interpretati all&#8217;arrembaggio!</title>
		<link>http://www.slug.it/naufraghi/iphone-tpm-linguaggi-interpretati-allarrembaggio/</link>
		<comments>http://www.slug.it/naufraghi/iphone-tpm-linguaggi-interpretati-allarrembaggio/#comments</comments>
		<pubDate>Mon, 21 Jul 2008 11:02:58 +0000</pubDate>
		<dc:creator>Matteo</dc:creator>
				<category><![CDATA[Generale]]></category>
		<category><![CDATA[informatica]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[software libero]]></category>

		<guid isPermaLink="false">http://www.slug.it/naufraghi/iphone-drm-linguaggi-interpretati-allarrembaggio/</guid>
		<description><![CDATA[La voglia è tanta&#8230; ma questa cosa del TPM rende mooolto più facile la tattica della &#8220;volpe e l&#8217;uva&#8221;! Da sviluppatore è proprio inconcepibile avere un oggetto, con un sistema operativo, un SDK, ottima documentazione, e&#8230; non poter provare un &#8230; <a href="http://www.slug.it/naufraghi/iphone-tpm-linguaggi-interpretati-allarrembaggio/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.fsf.org/blogs/community/5-reasons-to-avoid-iphone-3g"><img src="http://www.fsf.org/blogs/community/5-reasons-to-avoid-iphone-3g/iphone3g-small.png" class="alignleft" /></a></p>
<p>La voglia è tanta&#8230; ma questa cosa del TPM rende mooolto più facile la tattica della &#8220;volpe e l&#8217;uva&#8221;!</p>
<p>Da sviluppatore è proprio inconcepibile avere un oggetto, con un sistema operativo, un SDK, ottima documentazione, e&#8230; non poter provare un programma sul MIO dispositivo senza avergli fatto fare una giratina virtuale per prendere una firma a Cupertino (99€/anno per lo scomodo)!!</p>
<p>Poi un pensiero: «Perché mai iPhone è uscito senza Java?»</p>
<p>Ma è facile, perché con Java basta avere una Virtual Machine firmata per far girare tutti i programmi del mondo, e ciao ciao AppStore! Stessa cosa per Python-Ruby-Perl!</p>
<p>Quindi TPM mio caro, non hai un gran futuro! (spero!, non ho indagato a fondo, ma credo che il controllo sia per processo e non per&#8230; boh, sul linking dinamico o che sò)</p>
<p><span id="more-225"></span></p>
<p>A volte mi trovo a non riuscire a spiegare quale sia e quanto sia profondo il limite di questa scelta di Apple per la &#8220;libertà&#8221; del compratore.</p>
<p>Molti rispondono «Ma quando mai avrò bisogno di scrivere un programma per il mio cellulare?», però anche se non è evidente, quello che sta vendendo Apple, nel mondo delle auto sarebbe come comprare una bella macchina, pagarla più del suo prezzo (perché la tecnologia equivalente la trovate a giro anche a molto meno) e come &#8220;bonus&#8221; per la spesa maggiorata, poter fare il pieno solo da Agip!</p>
<p>La comprereste?</p>
]]></content:encoded>
			<wfw:commentRss>http://www.slug.it/naufraghi/iphone-tpm-linguaggi-interpretati-allarrembaggio/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Cython rocks</title>
		<link>http://www.slug.it/naufraghi/cython-rocks/</link>
		<comments>http://www.slug.it/naufraghi/cython-rocks/#comments</comments>
		<pubDate>Fri, 02 May 2008 00:30:13 +0000</pubDate>
		<dc:creator>Matteo</dc:creator>
				<category><![CDATA[informatica]]></category>
		<category><![CDATA[matematica]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[unifi]]></category>

		<guid isPermaLink="false">http://www.slug.it/naufraghi/cython-rocks/</guid>
		<description><![CDATA[Ho cominciato a lavorare sul serio all&#8217;università, in laboratorio si macinano proteine, tante, ed il povero Python non regge il passo. Durante la sosta forzata mi sono baloccato con OCaml, e devo dire che è un linguaggio interessante, anche se &#8230; <a href="http://www.slug.it/naufraghi/cython-rocks/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Ho cominciato a lavorare sul serio all&#8217;università, in laboratorio si macinano proteine, tante, ed il povero Python non regge il passo.</p>
<p>Durante la sosta forzata mi sono baloccato con <a href="http://caml.inria.fr/">OCaml</a>, e devo dire che è un linguaggio interessante, anche se per ora non sono ancora riuscito a realizzare un qualcosa di funzionante :/ !</p>
<p>Uscito da gesso e riabilitazione, ho cominciato a studiare le &#8220;nuove&#8221; reti neurali (<a href="http://www.google.com/search?q=deep+neural+networks">deep neural networks</a>), e ne ho implementata una in <a href="http://code.google.com/p/naufraghi/source/browse/dottorato/bplnn.py?r=114">poche paginate</a> in Python.</p>
<p>Però la velocità è quella che è&#8230; allora è partito il pellegrinaggio:</p>
<ol>
<li>Ho riscritto il tutto <a href="http://code.google.com/p/naufraghi/source/browse/dottorato/bplnn.ml">in OCaml</a>, ma c&#8217;è un bug che non fa convergere nulla&#8230; e non lo trovo!</li>
<li>Ho provato <a href="http://codespeak.net/pypy/">pypy</a>, per vedere se il mio codice era abbastanza <a href="http://www.google.com/search?q=pypy+rpython">RPython</a>&#8230; ma non lo era</li>
<li>Ho provato <a href="http://shed-skin.blogspot.com/">ShedSkin</a>, ma anche per lui il mio codice non era abbastanza statico.</li>
</ol>
<p>Allora mi sono arreso, l&#8217;inferenza ancora non è gratuita, e mi sono &#8220;abbassato&#8221; a buttare giù tipi e gestire la memoria, in Cython!</p>
<p>Adesso, avendo reimplementato solo la <a href="http://code.google.com/p/naufraghi/source/browse/dottorato/cbplnn.pyx">classe Layer</a>, l&#8217;apprendimento ha una velocità decente, il codice resta leggibile, non ho &#8220;esportato&#8221; il bug della versione in OCaml ed ho spazio per ulteriori ottimizzazioni senza perdere le comodità di Python!</p>
<p>Yuppie!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.slug.it/naufraghi/cython-rocks/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

