<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:blogger='http://schemas.google.com/blogger/2008' xmlns:georss='http://www.georss.org/georss' xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-5155646577566105197</id><updated>2024-10-09T03:29:06.701+02:00</updated><category term="python"/><category term="MPI"/><category term="message passing"/><category term="SQL"/><category term="portableApps"/><category term="pypar"/><category term="C"/><category term="MOOC"/><category term="key-value store"/><category term="mapreduce"/><category term="openmpi"/><category term="virtualbox"/><category term="CVS"/><category term="ETL"/><category term="JOIN"/><category term="R"/><category term="automation"/><category term="cineca"/><category term="configurazione"/><category term="corsi"/><category term="distanza"/><category term="git"/><category term="ipython"/><category term="lists"/><category term="lmdb"/><category term="make"/><category term="multiprocessing"/><category term="nose"/><category term="processori virtuali"/><category term="redis"/><category term="serializzazione"/><category term="sleep"/><category term="stringhe"/><category term="ubuntu"/><category term="unit testing"/><category term="zeromq"/><title type='text'>ockham&#39;s razorback</title><subtitle type='html'>metodi e strumenti per archiviare e leggere i tanti dati d&#39;inizio XXI secolo</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://ockhamrazorback.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5155646577566105197/posts/default?redirect=false'/><link rel='alternate' type='text/html' href='http://ockhamrazorback.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>gpciceri</name><uri>http://www.blogger.com/profile/07362450610863294854</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh5Jjco_6vmzsI4Vd0z3epQ8mZkdYgCq5c_sr6VP9O2gdapmIICPtssrlWi_UIwuNPdDY9xUB3TiAJf8Qs40xnyGOZ0MOH5f5rD92ufyPfzFYtCFhkA_yt4rE_Mv6vcwMg/s113/fotoProfiloGpciceri_20150729.jpg'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>21</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-5155646577566105197.post-4711587349428501409</id><published>2013-06-02T08:28:00.002+02:00</published><updated>2013-06-02T11:09:54.364+02:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="JOIN"/><category scheme="http://www.blogger.com/atom/ns#" term="key-value store"/><category scheme="http://www.blogger.com/atom/ns#" term="lmdb"/><category scheme="http://www.blogger.com/atom/ns#" term="redis"/><category scheme="http://www.blogger.com/atom/ns#" term="SQL"/><title type='text'>algoritmi di JOIN: l&#39;eredità dei DBMS ai tempi dei key-value store.</title><content type='html'>portate pazienza, si tratta di un post concettuale. abbiamo appena o stiamo per sostituire o affiancare, nei nostri programmini, agli ormai tradizionali DBMS (postgresql, mysql, sqlite - tanto per esemplificare) un qualche brillante key-value store (redis, riak, o il velocissimo lmdb - anche qui per esemplificare).&lt;br /&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
il &lt;a href=&quot;https://en.wikipedia.org/wiki/NoSQL&quot; target=&quot;_blank&quot;&gt;key-value store&lt;/a&gt; si presenta logicamente come una pseudotabella di soli due campi (chiave, valore) dove la chiave indicizza il valore permettendone il ritrovamento all&#39;interno della tabella. un altro modello logico di comprensione del key-value store è quello dell&#39;&lt;a href=&quot;http://it.wikipedia.org/wiki/Array_associativo&quot; target=&quot;_blank&quot;&gt;array associativo&lt;/a&gt; - un vettore di valori indicizzati per chiave (di solito una stringa) - reso persistente su disco.&lt;br /&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
va tutto bene, anzi una meraviglia - solo che prima o poi mi accorgo che devo mettere in una qualche relazione dati immagazzinati in due pseudotabelle diverse. oops, ma per queste cose con il DBMS avrei fatto una bella JOIN mentre, sorpresa, i key-value store non implementano l&#39;algebra relazionale.&amp;nbsp;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
ah ok è un classico caso del principio detto di faenza - si fa senza; andiamo solo a vedere come fanno i DBMS ad implementare le join, poi le riproporremo funzionalmente nel nostro codice applicativo.&lt;br /&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
per fortuna qualcuno su wikipedia si è preso il disturbo di tramandare ai posteri tutta questa scienza: ecco infatti come funzionano, in linea di principio, le &lt;a href=&quot;http://en.wikipedia.org/wiki/Nested_loop_join&quot; target=&quot;_blank&quot;&gt;nested loop join&lt;/a&gt;, le &lt;a href=&quot;http://en.wikipedia.org/wiki/Hash_join&quot; target=&quot;_blank&quot;&gt;hash join&lt;/a&gt;, le &lt;a href=&quot;http://en.wikipedia.org/wiki/Sort-merge_join&quot; target=&quot;_blank&quot;&gt;sort-merge join&lt;/a&gt;: buona lettura.&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
ora, qualcuno potrebbe pensare, e non avrebbe tutti i torti, che stiamo facendo un gigantesco passo all&#39;indietro se dopo quarant&#39;anni circa di database relazionale ci tocca reimplementare le join a manina: è un&#39;opinione legittima.&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://ockhamrazorback.blogspot.com/feeds/4711587349428501409/comments/default' title='Commenti sul post'/><link rel='replies' type='text/html' href='http://ockhamrazorback.blogspot.com/2013/06/algoritmi-di-join-leredita-dei-dbms-ai.html#comment-form' title='0 Commenti'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5155646577566105197/posts/default/4711587349428501409'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5155646577566105197/posts/default/4711587349428501409'/><link rel='alternate' type='text/html' href='http://ockhamrazorback.blogspot.com/2013/06/algoritmi-di-join-leredita-dei-dbms-ai.html' title='algoritmi di JOIN: l&#39;eredità dei DBMS ai tempi dei key-value store.'/><author><name>gpciceri</name><uri>http://www.blogger.com/profile/07362450610863294854</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh5Jjco_6vmzsI4Vd0z3epQ8mZkdYgCq5c_sr6VP9O2gdapmIICPtssrlWi_UIwuNPdDY9xUB3TiAJf8Qs40xnyGOZ0MOH5f5rD92ufyPfzFYtCFhkA_yt4rE_Mv6vcwMg/s113/fotoProfiloGpciceri_20150729.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5155646577566105197.post-2009780485945916812</id><published>2013-05-28T20:33:00.001+02:00</published><updated>2013-06-02T08:30:25.644+02:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="key-value store"/><category scheme="http://www.blogger.com/atom/ns#" term="python"/><category scheme="http://www.blogger.com/atom/ns#" term="SQL"/><title type='text'>lmdb (e py-lmdb): dentro OpenLDAP si nasconde la nuova lepre dei database key/value store</title><content type='html'>sembra che ci sia un nuovo sceriffo in città. il suo nome è&amp;nbsp;&lt;a href=&quot;http://symas.com/mdb/&quot; target=&quot;_blank&quot;&gt;Lightning MDB&lt;/a&gt;&amp;nbsp;(lmdb): è un key/value store&amp;nbsp;(logicamente si presenta come un semplice tabellone con due campi, una chiave ed un valore) ai benchmark&amp;nbsp;&lt;a href=&quot;http://symas.com/mdb/microbench/&quot; target=&quot;_blank&quot;&gt;fa faville&lt;/a&gt;&amp;nbsp;(batte anche levelDb di google). ah, in giro non si trova facilmente - è però a disposizione con la distribuzione di OpenLDAP.&lt;br /&gt;
&lt;br /&gt;
ovviamente c&#39;è l&#39;interfaccia per python, py-lmdb,&amp;nbsp;&lt;a href=&quot;https://github.com/dw/py-lmdb/&quot; target=&quot;_blank&quot;&gt;eccola qui&lt;/a&gt;.&lt;br /&gt;
&lt;br /&gt;
fosse tutto qui non sarebbe davvero male, ma non molto interessante. quando ho provato ad usarlo però - su un esempietto facile facile (trovare le righe doppie in un file da 7M di righe circa) - ho mandato in vacca il programma per aver provato a fare tutto in un&#39;unica transazione: la bestiaccia mi ha dato MDB_TXN_FULL (errore -30788) cioè &quot;Txn has too many dirty pages&quot;.&lt;br /&gt;
&lt;br /&gt;
uh-uh, sembra ci sia un limite hard-coded (cioè &quot;inchiodato&quot; nel codice) alla dimensione max di una transazione, così almeno &lt;a href=&quot;http://www.openldap.org/lists/openldap-devel/201303/msg00002.html&quot; target=&quot;_blank&quot;&gt;riporta la mailing list di openLDAP&lt;/a&gt;&amp;nbsp;assieme alla (consueta) promessa che il limite verrà tosto eliminato.&lt;br /&gt;
&lt;br /&gt;
già, ma nel frattempo? beh, visto che py-lmdb si porta appreso una copia dei sorgenti di lmdb si può provare ad inchiodarci un valore più elevato (non risolverò del tutto ma almeno sposto il confine più avanti). cerca cerca (mi piace vincere facile, lmdb sono in tutto quattro soli file) ecco&amp;nbsp;&lt;a href=&quot;http://symas.com/mdb/doc/midl_8h_source.html&quot; target=&quot;_blank&quot;&gt;finalmente in midl.h la riga responsabile&lt;/a&gt;&amp;nbsp;(la riga 60)&lt;br /&gt;
&lt;br /&gt;
#define MDB_IDL_LOGN &amp;nbsp; &amp;nbsp;16 &amp;nbsp;/* DB_SIZE is 2^16, UM_SIZE is 2^17 */&lt;br /&gt;
&lt;br /&gt;
è stato sufficiente impostare il valore a 24 e ricompilare il module. per comodità mia ho fatto una copia del modulo con il (nuovo) nome lmbdXXL (extra-large) in modo da poter tenere a disposizione anche l&#39;originale e fare così tutti i confronti del caso. l&#39;interfaccia tramite cpython funziona (la cffi no, boh devo ancora capire).&lt;br /&gt;
&lt;br /&gt;</content><link rel='replies' type='application/atom+xml' href='http://ockhamrazorback.blogspot.com/feeds/2009780485945916812/comments/default' title='Commenti sul post'/><link rel='replies' type='text/html' href='http://ockhamrazorback.blogspot.com/2013/05/lmdb-e-py-lmdb-dentro-openldap-si.html#comment-form' title='0 Commenti'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5155646577566105197/posts/default/2009780485945916812'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5155646577566105197/posts/default/2009780485945916812'/><link rel='alternate' type='text/html' href='http://ockhamrazorback.blogspot.com/2013/05/lmdb-e-py-lmdb-dentro-openldap-si.html' title='lmdb (e py-lmdb): dentro OpenLDAP si nasconde la nuova lepre dei database key/value store'/><author><name>gpciceri</name><uri>http://www.blogger.com/profile/07362450610863294854</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh5Jjco_6vmzsI4Vd0z3epQ8mZkdYgCq5c_sr6VP9O2gdapmIICPtssrlWi_UIwuNPdDY9xUB3TiAJf8Qs40xnyGOZ0MOH5f5rD92ufyPfzFYtCFhkA_yt4rE_Mv6vcwMg/s113/fotoProfiloGpciceri_20150729.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5155646577566105197.post-3602632771532895006</id><published>2013-05-10T08:23:00.000+02:00</published><updated>2013-05-12T22:51:30.023+02:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="multiprocessing"/><category scheme="http://www.blogger.com/atom/ns#" term="python"/><category scheme="http://www.blogger.com/atom/ns#" term="sleep"/><title type='text'>astenersi perditempo seriali</title><content type='html'>&lt;br /&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;esempio banale che illustra come poter dormire per più di un secondo al secondo.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;#! /usr/bin/env python&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;import multiprocessing&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;from time import time, sleep&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;import random&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;import sys, os&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;# how big is the process pool&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;POOLSIZE = 5&lt;/span&gt;&lt;br /&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;# how many (named) works to process&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;BEDS = [&quot;b0&quot;, &quot;b1&quot;, &quot;b2&quot;, &quot;b3&quot;, &quot;b4&quot;, &quot;b5&quot;, &quot;b6&quot;, &quot;b7&quot;, &quot;b8&quot;, &quot;b9&quot;]&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;sleepList = BEDS[0:POOLSIZE] * 10&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;def PerdiTempo(aSleepName):&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; currtime = time()&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; name = multiprocessing.current_process().name&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; rc = random.randint(1,10)&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; sleep(rc)&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; sys.stderr.write(&quot;name %s, pid: %d - (bed %s) - sleep %d. time elapsed %f\n&quot; % (name, os.getpid(), aSleepName, rc, time() - currtime))&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; return rc&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;if __name__ == &quot;__main__&quot;:&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; currtime = time()&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; print &quot;%s started, pid: %d, pool size: %d&quot; % (sys.argv[0], os.getpid(), POOLSIZE)&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; print &quot;to sleep:&quot;, sleepList&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; po =&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;multiprocessing.&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;Pool(POOLSIZE)&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; res = po.map_async(PerdiTempo,(i for i in sleepList))&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; w = sum(res.get())&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; print &quot;total time lost: %d (sec.)&quot; % (w,)&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; elap = time() - currtime&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; print &#39;pid: %d ended, pool size of %d workers. time elapsed: %f (sec.). speedup: %5.2fx&#39; % (os.getpid(), POOLSIZE, elap, w/elap)&lt;/span&gt;&lt;br /&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://ockhamrazorback.blogspot.com/feeds/3602632771532895006/comments/default' title='Commenti sul post'/><link rel='replies' type='text/html' href='http://ockhamrazorback.blogspot.com/2013/05/astenersi-perditempo-seriali.html#comment-form' title='0 Commenti'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5155646577566105197/posts/default/3602632771532895006'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5155646577566105197/posts/default/3602632771532895006'/><link rel='alternate' type='text/html' href='http://ockhamrazorback.blogspot.com/2013/05/astenersi-perditempo-seriali.html' title='astenersi perditempo seriali'/><author><name>gpciceri</name><uri>http://www.blogger.com/profile/07362450610863294854</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh5Jjco_6vmzsI4Vd0z3epQ8mZkdYgCq5c_sr6VP9O2gdapmIICPtssrlWi_UIwuNPdDY9xUB3TiAJf8Qs40xnyGOZ0MOH5f5rD92ufyPfzFYtCFhkA_yt4rE_Mv6vcwMg/s113/fotoProfiloGpciceri_20150729.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5155646577566105197.post-6485850504965859918</id><published>2013-04-14T13:22:00.001+02:00</published><updated>2013-04-14T13:23:59.938+02:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="lists"/><category scheme="http://www.blogger.com/atom/ns#" term="MOOC"/><category scheme="http://www.blogger.com/atom/ns#" term="python"/><title type='text'>dalla khan academy, un altro mooc: tutorial sulle liste in python</title><content type='html'>questo tutorial sulle liste in python è carino.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;http://www.khanacademy.org/video/python-lists?utm_campaign=embed&quot; style=&quot;color: #111111; font-family: helvetica;&quot; target=&quot;_blank&quot;&gt;&lt;b style=&quot;color: #111111; font-family: helvetica;&quot;&gt;Python Lists&lt;/b&gt;&lt;span style=&quot;color: #111111; font-family: helvetica;&quot;&gt;: Understanding the basics of lists in Python
&lt;/span&gt;&lt;/a&gt;&lt;br /&gt;
&lt;iframe allowfullscreen=&quot;&quot; frameborder=&quot;0&quot; height=&quot;355&quot; mozallowfullscreen=&quot;&quot; scrolling=&quot;no&quot; src=&quot;http://www.khanacademy.org/embed_video?v=zEyEC34MY1A&quot; webkitallowfullscreen=&quot;&quot; width=&quot;560&quot;&gt;&lt;/iframe&gt;
</content><link rel='replies' type='application/atom+xml' href='http://ockhamrazorback.blogspot.com/feeds/6485850504965859918/comments/default' title='Commenti sul post'/><link rel='replies' type='text/html' href='http://ockhamrazorback.blogspot.com/2013/04/dalla-khan-academy-un-altro-mooc.html#comment-form' title='0 Commenti'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5155646577566105197/posts/default/6485850504965859918'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5155646577566105197/posts/default/6485850504965859918'/><link rel='alternate' type='text/html' href='http://ockhamrazorback.blogspot.com/2013/04/dalla-khan-academy-un-altro-mooc.html' title='dalla khan academy, un altro mooc: tutorial sulle liste in python'/><author><name>gpciceri</name><uri>http://www.blogger.com/profile/07362450610863294854</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh5Jjco_6vmzsI4Vd0z3epQ8mZkdYgCq5c_sr6VP9O2gdapmIICPtssrlWi_UIwuNPdDY9xUB3TiAJf8Qs40xnyGOZ0MOH5f5rD92ufyPfzFYtCFhkA_yt4rE_Mv6vcwMg/s113/fotoProfiloGpciceri_20150729.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5155646577566105197.post-9158719168344853600</id><published>2013-04-14T12:26:00.002+02:00</published><updated>2013-04-14T18:29:40.537+02:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="MOOC"/><category scheme="http://www.blogger.com/atom/ns#" term="python"/><category scheme="http://www.blogger.com/atom/ns#" term="R"/><category scheme="http://www.blogger.com/atom/ns#" term="SQL"/><title type='text'>primavera: è tempo per i massive open online courses</title><content type='html'>sono stato distratto da qualche altra attività nell&#39;ultimo mese, ma cmq tutto bene. l&#39;ultima mia passione compulsiva - fresca fresca di stamane, sono i MOOC (&lt;a href=&quot;http://it.wikipedia.org/wiki/MOOC&quot; target=&quot;_blank&quot;&gt;massive open online courses&lt;/a&gt;), corsi online aperti per formazione a distanza. mi sono pure iscritto al mio primo mooc, &lt;a href=&quot;https://www.coursera.org/course/datasci&quot; target=&quot;_blank&quot;&gt;Introduction to Data Science&lt;/a&gt;, che guarda caso utilizza i miei stessi building blocks (python, sql, R in misura minore) preferiti. </content><link rel='replies' type='application/atom+xml' href='http://ockhamrazorback.blogspot.com/feeds/9158719168344853600/comments/default' title='Commenti sul post'/><link rel='replies' type='text/html' href='http://ockhamrazorback.blogspot.com/2013/04/primavera-e-tempo-per-i-massive-open.html#comment-form' title='0 Commenti'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5155646577566105197/posts/default/9158719168344853600'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5155646577566105197/posts/default/9158719168344853600'/><link rel='alternate' type='text/html' href='http://ockhamrazorback.blogspot.com/2013/04/primavera-e-tempo-per-i-massive-open.html' title='primavera: è tempo per i massive open online courses'/><author><name>gpciceri</name><uri>http://www.blogger.com/profile/07362450610863294854</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh5Jjco_6vmzsI4Vd0z3epQ8mZkdYgCq5c_sr6VP9O2gdapmIICPtssrlWi_UIwuNPdDY9xUB3TiAJf8Qs40xnyGOZ0MOH5f5rD92ufyPfzFYtCFhkA_yt4rE_Mv6vcwMg/s113/fotoProfiloGpciceri_20150729.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5155646577566105197.post-5026225494412804520</id><published>2013-03-10T20:40:00.001+01:00</published><updated>2013-03-10T20:40:31.764+01:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="CVS"/><category scheme="http://www.blogger.com/atom/ns#" term="git"/><title type='text'>un tutorial sul sistema di controllo versione Git</title><content type='html'>&lt;br /&gt;
continuo a mettere insieme i materiali per il mio prossimo corso &lt;a href=&quot;http://www.geneticagraria.it/news_dett.asp?a_pag=3&amp;amp;id=615&quot; target=&quot;_blank&quot;&gt;Metodi ed applicazioni di informatica per l&#39;analisi di dati biologici&lt;/a&gt;. questo &lt;a href=&quot;http://nyuccl.org/pages/GitTutorial/&quot; target=&quot;_blank&quot;&gt;tutorial su Git&lt;/a&gt;, il sistema di controllo versione del nuovo millennio, mi sembra abbastanza indicato.&amp;nbsp;Citando l&#39;autore &quot;This is a tutorial is targeted at users who are new to version control systems, or just new to git. It goes over the basics of how to save and share your work in git, and give a conceptual explanation of branching&quot;.&lt;br /&gt;
&lt;br /&gt;
per iniziare, non serve di più.&lt;br /&gt;
&lt;br /&gt;
per gli aspiranti cultori della materia invece, &lt;a href=&quot;http://en.wikipedia.org/wiki/Git_(software)&quot; target=&quot;_blank&quot;&gt;la pagina (inglese) di wikipedia a riguardo&lt;/a&gt; è un passaggio obbligato.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;</content><link rel='replies' type='application/atom+xml' href='http://ockhamrazorback.blogspot.com/feeds/5026225494412804520/comments/default' title='Commenti sul post'/><link rel='replies' type='text/html' href='http://ockhamrazorback.blogspot.com/2013/03/un-tutorial-sul-sistema-di-controllo.html#comment-form' title='0 Commenti'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5155646577566105197/posts/default/5026225494412804520'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5155646577566105197/posts/default/5026225494412804520'/><link rel='alternate' type='text/html' href='http://ockhamrazorback.blogspot.com/2013/03/un-tutorial-sul-sistema-di-controllo.html' title='un tutorial sul sistema di controllo versione Git'/><author><name>gpciceri</name><uri>http://www.blogger.com/profile/07362450610863294854</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh5Jjco_6vmzsI4Vd0z3epQ8mZkdYgCq5c_sr6VP9O2gdapmIICPtssrlWi_UIwuNPdDY9xUB3TiAJf8Qs40xnyGOZ0MOH5f5rD92ufyPfzFYtCFhkA_yt4rE_Mv6vcwMg/s113/fotoProfiloGpciceri_20150729.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5155646577566105197.post-2704326362180846777</id><published>2013-03-01T15:59:00.001+01:00</published><updated>2013-03-10T20:42:33.318+01:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="ETL"/><category scheme="http://www.blogger.com/atom/ns#" term="python"/><title type='text'>le date in formato ISO8601, please</title><content type='html'>avviso ai naviganti: per passarsi le date, nulla di meglio del &lt;a href=&quot;http://it.wikipedia.org/wiki/ISO_8601&quot; target=&quot;_blank&quot;&gt;formato standard ISO8601&lt;/a&gt;&amp;nbsp;(ad esempio &quot;oggi&quot; si scrive 2013-03-01). e quando il valore è mancante? si può usare sempre il vecchio valore-tappo &quot;0000-00-00&quot;. his fretus, ecco qui una stupidissima funzione che valida un campo data sì congegnato (ovviamente valida date nel range di funziona&lt;span style=&quot;font-family: inherit;&quot;&gt;mento della funzione&amp;nbsp;datetime.strptime()):&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;DATEFMTIN = &quot;%Y-%m-%d&quot;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;DATEFMTOUT = &#39;%04d-%02d-%02d&#39;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;MISSINGDATE = &quot;0000-00-00&quot;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;def isValidDate(aString):&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; # la stringa &quot;0000-00-00&quot; è il valore missing&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; if aString == MISSINGDATE:&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return True&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; try:&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; #leggo la stringa AAAA-MM-DD in una data&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; aDate = datetime.strptime(aString, DATEFMTIN)&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; #converto la data letta in un&#39;altra stringa&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; anotherString = DATEFMTOUT % (aDate.year, aDate.month, aDate.day)&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; #verifico che l&#39;operazione sia idempotente&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; assert aString == anotherString&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return True&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; except ValueError, e:&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; print &quot;Date not Valid (value):&quot;, aString.__repr__()&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return False&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; except AssertionError, e:&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; print &quot;Date not Valid (not idempot.)&quot;, aString.__repr__()&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return False&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;tribute: questo post non sarebbe mai esistito senza la pazienza, cura et abnegazione dell&#39;ottimo M.Piccoli - non mi ha mandato a stendere, assieme a tutte le mie insopportabili saccenze. grazie 1K.&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;</content><link rel='replies' type='application/atom+xml' href='http://ockhamrazorback.blogspot.com/feeds/2704326362180846777/comments/default' title='Commenti sul post'/><link rel='replies' type='text/html' href='http://ockhamrazorback.blogspot.com/2013/03/le-date-in-formato-iso8601-please.html#comment-form' title='0 Commenti'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5155646577566105197/posts/default/2704326362180846777'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5155646577566105197/posts/default/2704326362180846777'/><link rel='alternate' type='text/html' href='http://ockhamrazorback.blogspot.com/2013/03/le-date-in-formato-iso8601-please.html' title='le date in formato ISO8601, please'/><author><name>gpciceri</name><uri>http://www.blogger.com/profile/07362450610863294854</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh5Jjco_6vmzsI4Vd0z3epQ8mZkdYgCq5c_sr6VP9O2gdapmIICPtssrlWi_UIwuNPdDY9xUB3TiAJf8Qs40xnyGOZ0MOH5f5rD92ufyPfzFYtCFhkA_yt4rE_Mv6vcwMg/s113/fotoProfiloGpciceri_20150729.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5155646577566105197.post-7682526435512133289</id><published>2013-02-20T19:26:00.003+01:00</published><updated>2013-03-26T14:30:28.969+01:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="message passing"/><category scheme="http://www.blogger.com/atom/ns#" term="portableApps"/><category scheme="http://www.blogger.com/atom/ns#" term="python"/><category scheme="http://www.blogger.com/atom/ns#" term="virtualbox"/><title type='text'>Il corso: metodi ed applicazioni di informatica per l&#39;analisi di dati biologici.</title><content type='html'>&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
Il programma generale. Eccolo qui:&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
0. Dove elaborare dati scientifici: alcune piattaforme di riferimento. L’enorme diffusione di strumenti di informatica individuale offre l’opportunità di poter analizzare dati in scenari all&#39;apparenza insoliti ma davvero utili. Esamineremo il caso delle applicazioni windows portabili, installabili ed utilizzabili cioè su e da una semplice chiavetta USB ed il meccanismo delle macchine virtuali, dove un sistema operativo completo viene fatto funzionare all&#39;interno, come ospite, di un altro sistema operativo – evitando così difficili istallazioni. &amp;nbsp;Infine viene fatto un cenno a git, un sistema di controllo versione che permette di tenere sistematicamente traccia dei propri lavori.&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
1. Linux, a riga di comando. L’utilizzo di linux viene introdotto attraverso la spiegazione della sua interfaccia tradizionale, la cosiddetta riga di comando (shell), con i suoi meccanismi e programmi di base. Viene poi spiegato il filesystem: come orientarsi tra file, directory e link vari.&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
2. Le espressioni regolari (regex). Uno dei problemi più frequenti è quello di ricercare, all&#39;interno di un file, solo quelle righe che contengano determinate informazioni. Le espressioni regolari, descritte in modo introduttivo, aiutano a risolvere questo problema in modo elegante e conciso.&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
3. Il linguaggio Python, un’introduzione. La programmazione scientifica è stata nel tempo effettuata con tutti i linguaggi che si sono via via affermati al pubblico: nella la corrente dei linguaggi di scripting (Perl, Python, Tcl tra gli altri), che predilige la produttività di chi scrive codice rispetto all&#39;efficienza computazionale assoluta, Python è emerso in virtù della sua eleganza nei costrutti di base e della sua efficacia. Per affrontare problemi di derivazione scientifica sono state scritte apposite estensioni al linguaggio che rendono fattibili e semplici attività normalmente ritenute complesse.&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
4. Elementi di programmazione parallela. Le moderne CPU presentano un parallelismo intrinseco che permette di svolgere più lavori contemporaneamente. Verrà spiegato come trarre vantaggio di questa potenza nei problemi di elaborazione di grandi quantità di dati.&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
5. Programmare (anche) per gli altri: infine vengono presentati cenni di programmazione professionale. quando cioè si desidera che altri usino i programmi che scriviamo.&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://ockhamrazorback.blogspot.com/feeds/7682526435512133289/comments/default' title='Commenti sul post'/><link rel='replies' type='text/html' href='http://ockhamrazorback.blogspot.com/2013/02/il-corso-metodi-ed-applicazioni-di.html#comment-form' title='0 Commenti'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5155646577566105197/posts/default/7682526435512133289'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5155646577566105197/posts/default/7682526435512133289'/><link rel='alternate' type='text/html' href='http://ockhamrazorback.blogspot.com/2013/02/il-corso-metodi-ed-applicazioni-di.html' title='Il corso: metodi ed applicazioni di informatica per l&#39;analisi di dati biologici.'/><author><name>gpciceri</name><uri>http://www.blogger.com/profile/07362450610863294854</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh5Jjco_6vmzsI4Vd0z3epQ8mZkdYgCq5c_sr6VP9O2gdapmIICPtssrlWi_UIwuNPdDY9xUB3TiAJf8Qs40xnyGOZ0MOH5f5rD92ufyPfzFYtCFhkA_yt4rE_Mv6vcwMg/s113/fotoProfiloGpciceri_20150729.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5155646577566105197.post-5652514249159230100</id><published>2013-02-06T08:12:00.003+01:00</published><updated>2013-02-06T08:12:58.552+01:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="portableApps"/><title type='text'>dopo sei mesi di portableapps, the winner is...</title><content type='html'>vediamo un po&#39; che cosa ho usato di più... almeno dalla lista dei miei preferiti.&lt;br /&gt;
&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;7-zip&lt;/li&gt;
&lt;li&gt;Console&lt;/li&gt;
&lt;li&gt;GIMP&lt;/li&gt;
&lt;li&gt;Google Chrome&lt;/li&gt;
&lt;li&gt;Notepad++&lt;/li&gt;
&lt;li&gt;Skype&lt;/li&gt;
&lt;li&gt;XMind&lt;/li&gt;
&lt;li&gt;LibreCAD (anche se da poco)&lt;/li&gt;
&lt;/ul&gt;
&lt;br /&gt;
fuori concorso ma massimamente apprezzati: MinGW32 (compilatore gcc ed altri tool di sviluppo) e Python Portable</content><link rel='replies' type='application/atom+xml' href='http://ockhamrazorback.blogspot.com/feeds/5652514249159230100/comments/default' title='Commenti sul post'/><link rel='replies' type='text/html' href='http://ockhamrazorback.blogspot.com/2013/02/dopo-sei-mesi-di-portableapps-winner-is.html#comment-form' title='0 Commenti'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5155646577566105197/posts/default/5652514249159230100'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5155646577566105197/posts/default/5652514249159230100'/><link rel='alternate' type='text/html' href='http://ockhamrazorback.blogspot.com/2013/02/dopo-sei-mesi-di-portableapps-winner-is.html' title='dopo sei mesi di portableapps, the winner is...'/><author><name>gpciceri</name><uri>http://www.blogger.com/profile/07362450610863294854</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh5Jjco_6vmzsI4Vd0z3epQ8mZkdYgCq5c_sr6VP9O2gdapmIICPtssrlWi_UIwuNPdDY9xUB3TiAJf8Qs40xnyGOZ0MOH5f5rD92ufyPfzFYtCFhkA_yt4rE_Mv6vcwMg/s113/fotoProfiloGpciceri_20150729.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5155646577566105197.post-2666819295228376676</id><published>2013-02-02T01:56:00.001+01:00</published><updated>2013-02-03T09:06:01.191+01:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="message passing"/><category scheme="http://www.blogger.com/atom/ns#" term="openmpi"/><category scheme="http://www.blogger.com/atom/ns#" term="pypar"/><category scheme="http://www.blogger.com/atom/ns#" term="python"/><title type='text'>building pypar on windows w/OpenMPI, some hints</title><content type='html'>rather suboptimal..., but here it is (it needs a recent pypar release, python 2.7, OpenMPI 1.6.2 on win32 and Mingw32 gcc)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
0. modify setup.py to find OpenMPI installation and libraries (it&#39;s not able to find them by itself)&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;# I keep my OpenMPI installation somewhere in the far&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;mpi_flags[&#39;inc_dirs&#39;].append(&quot;e:\\OpenMPI_v1.6.2-win32\\include&quot;)&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;# ehm... OpenMPI .dlls are in the bin directory&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;mpi_flags[&#39;lib_dirs&#39;].append(&quot;e:\\OpenMPI_v1.6.2-win32\\bin&quot;)&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;mpi_flags[&#39;libs&#39;] = [&quot;libmpi&quot;, &quot;libopen-pal&quot;, &quot;libopen-rte&quot;]&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
1. modify pypar.py to generalize a unix-specific hack (the OSX users have a similar issue)&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;# Work around bug in OpenMPI (December 2009):&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;# https://bugs.launchpad.net/ubuntu/+source/petsc4py/+bug/232036&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;from ctypes import *&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;if sys.platform==&quot;win32&quot;:&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; mpi = CDLL(&#39;libmpi.dll&#39;, RTLD_GLOBAL)&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;else:&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; mpi = CDLL(&#39;libmpi.so.0&#39;, RTLD_GLOBAL)&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;# End work around&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
2. the worst, add manually the runtime OpenMPI dll the the pypar installation directory&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;in site-packages\pypar, put them&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;libmpi.dll&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;libopen-pal&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;libopen-rte&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
then it seems to work: here it is the standard demo.py execution log (the btl_tcp_if_exclude warning depends from the strange loopback setup in win 7)&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;Pypar (version 2.1.4) initialised MPI OK with 2 processors&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;I am proc 0 of 2 on node andie&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;Processor 0 sending message &quot;MSGP0&quot; to processor 1&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;Processor 0 received message &quot;MSGP0-&amp;gt;P1&quot; from processor 1&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;Size of msg was 9 bytes&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;I am proc 1 of 2 on node andie&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;Processor 1 received message &quot;MSGP0&quot; from processor 0&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;Size of msg was 5 bytes&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;Processor 1 sending msg &quot;MSGP0-&amp;gt;P1&quot; to 0&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;[andie:06164] 1 more process has sent help message help-mpi-btl-tcp.txt / invalid if_inexclude&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;--------------------------------------------------------------------------&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;WARNING: An invalid value was given for btl_tcp_if_exclude. &amp;nbsp;This&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;value will be ignored.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; Local host: andie&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; Value: &amp;nbsp; &amp;nbsp; &amp;nbsp;127.0.0.1/8&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; Message: &amp;nbsp; &amp;nbsp;Did not find interface matching this subnet&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;--------------------------------------------------------------------------&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;[andie:06164] Set MCA parameter &quot;orte_base_help_aggregate&quot; to 0 to see all help / error messages&lt;/span&gt;&lt;br /&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;</content><link rel='replies' type='application/atom+xml' href='http://ockhamrazorback.blogspot.com/feeds/2666819295228376676/comments/default' title='Commenti sul post'/><link rel='replies' type='text/html' href='http://ockhamrazorback.blogspot.com/2013/02/building-pypar-on-windows-wopenmpi.html#comment-form' title='0 Commenti'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5155646577566105197/posts/default/2666819295228376676'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5155646577566105197/posts/default/2666819295228376676'/><link rel='alternate' type='text/html' href='http://ockhamrazorback.blogspot.com/2013/02/building-pypar-on-windows-wopenmpi.html' title='building pypar on windows w/OpenMPI, some hints'/><author><name>gpciceri</name><uri>http://www.blogger.com/profile/07362450610863294854</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh5Jjco_6vmzsI4Vd0z3epQ8mZkdYgCq5c_sr6VP9O2gdapmIICPtssrlWi_UIwuNPdDY9xUB3TiAJf8Qs40xnyGOZ0MOH5f5rD92ufyPfzFYtCFhkA_yt4rE_Mv6vcwMg/s113/fotoProfiloGpciceri_20150729.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5155646577566105197.post-2307185674690146175</id><published>2013-02-01T09:42:00.002+01:00</published><updated>2013-02-01T09:43:21.533+01:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="mapreduce"/><category scheme="http://www.blogger.com/atom/ns#" term="message passing"/><category scheme="http://www.blogger.com/atom/ns#" term="MPI"/><category scheme="http://www.blogger.com/atom/ns#" term="python"/><title type='text'>MPIMapreducer, a pythonic mapreduce-over-MPI demo implementation</title><content type='html'>è abbastanza semplice implementare &lt;a href=&quot;http://research.google.com/archive/mapreduce.html&quot; target=&quot;_blank&quot;&gt;il modello di programmazione noto come mapreduce&lt;/a&gt;, una volta che hai &lt;a href=&quot;http://en.wikipedia.org/wiki/Message_Passing_Interface&quot; target=&quot;_blank&quot;&gt;la MPI standard&lt;/a&gt; a disposizione. ecco infatti &lt;a href=&quot;https://code.google.com/p/pypar/source/detail?r=109&quot; target=&quot;_blank&quot;&gt;MPIMapreducer&lt;/a&gt;, un esempio.</content><link rel='replies' type='application/atom+xml' href='http://ockhamrazorback.blogspot.com/feeds/2307185674690146175/comments/default' title='Commenti sul post'/><link rel='replies' type='text/html' href='http://ockhamrazorback.blogspot.com/2013/02/mpimapreducer-pythonic-mapreduce-over.html#comment-form' title='0 Commenti'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5155646577566105197/posts/default/2307185674690146175'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5155646577566105197/posts/default/2307185674690146175'/><link rel='alternate' type='text/html' href='http://ockhamrazorback.blogspot.com/2013/02/mpimapreducer-pythonic-mapreduce-over.html' title='MPIMapreducer, a pythonic mapreduce-over-MPI demo implementation'/><author><name>gpciceri</name><uri>http://www.blogger.com/profile/07362450610863294854</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh5Jjco_6vmzsI4Vd0z3epQ8mZkdYgCq5c_sr6VP9O2gdapmIICPtssrlWi_UIwuNPdDY9xUB3TiAJf8Qs40xnyGOZ0MOH5f5rD92ufyPfzFYtCFhkA_yt4rE_Mv6vcwMg/s113/fotoProfiloGpciceri_20150729.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5155646577566105197.post-2456790864206839087</id><published>2013-01-31T23:12:00.001+01:00</published><updated>2013-01-31T23:12:22.433+01:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="cineca"/><category scheme="http://www.blogger.com/atom/ns#" term="corsi"/><category scheme="http://www.blogger.com/atom/ns#" term="MPI"/><category scheme="http://www.blogger.com/atom/ns#" term="python"/><title type='text'>i corsi HPC del Cineca</title><content type='html'>appena trovato grazie al solito giro su google (cercavo un qualche tutorial per mpi4py, visto che &lt;a href=&quot;http://www.lfd.uci.edu/~gohlke/pythonlibs/#mpi4py&quot; target=&quot;_blank&quot;&gt;ho trovato nel solito posto il modulo già pronto&lt;/a&gt;&amp;nbsp;per windows e devo invece ancora decidermi a portarci pypar), l&#39;archivio di &lt;a href=&quot;http://corsi.cineca.it/&quot; target=&quot;_blank&quot;&gt;alcuni corsi HPC (high-performance computing)&lt;/a&gt; del Cineca. materiale molto fresco (annate 2011 e 2012): aspetta che me lo studio con calma.</content><link rel='replies' type='application/atom+xml' href='http://ockhamrazorback.blogspot.com/feeds/2456790864206839087/comments/default' title='Commenti sul post'/><link rel='replies' type='text/html' href='http://ockhamrazorback.blogspot.com/2013/01/i-corsi-hpc-del-cineca.html#comment-form' title='0 Commenti'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5155646577566105197/posts/default/2456790864206839087'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5155646577566105197/posts/default/2456790864206839087'/><link rel='alternate' type='text/html' href='http://ockhamrazorback.blogspot.com/2013/01/i-corsi-hpc-del-cineca.html' title='i corsi HPC del Cineca'/><author><name>gpciceri</name><uri>http://www.blogger.com/profile/07362450610863294854</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh5Jjco_6vmzsI4Vd0z3epQ8mZkdYgCq5c_sr6VP9O2gdapmIICPtssrlWi_UIwuNPdDY9xUB3TiAJf8Qs40xnyGOZ0MOH5f5rD92ufyPfzFYtCFhkA_yt4rE_Mv6vcwMg/s113/fotoProfiloGpciceri_20150729.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5155646577566105197.post-4044329559363012228</id><published>2013-01-29T20:37:00.002+01:00</published><updated>2013-01-29T20:37:56.108+01:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="automation"/><category scheme="http://www.blogger.com/atom/ns#" term="C"/><category scheme="http://www.blogger.com/atom/ns#" term="make"/><title type='text'>automatismi nella trasformazione di dati, con make</title><content type='html'>questo articolo presenta un concetto interessante; parla infatti di &lt;a href=&quot;http://blog.kaggle.com/2012/10/15/make-for-data-scientists/&quot; target=&quot;_blank&quot;&gt;come utilizzare l&#39;utility unix make per automatizzare procedure che maneggiano dati&lt;/a&gt;. riprendo verbatim come descrive la situazione&lt;br /&gt;
&lt;br /&gt;
&quot;&quot;&quot;&lt;br /&gt;
Any reasonably complicated data analysis or visualization project will involve a number of stages. Typically, the data starts in some raw form and must be extracted and cleaned. Then there are a few transformation stages to get the data in the right shape, merge it with secondary data sources, or run it against a model. Finally, the results get converted into the output format desired.&lt;br /&gt;
&quot;&quot;&quot;&lt;br /&gt;
&lt;br /&gt;
cosa propone? di utilizzare dei makefile per pilotare il processo&lt;br /&gt;
&lt;br /&gt;
&quot;&quot;&quot;&lt;br /&gt;
Fortunately, I&#39;m not the first person to want to automate a computation pipeline. Way back in 1977, Stuart Feldman at Bell Labs realized that the tasks required to compile a program could be abstracted out into a general-purpose pipeline tool. The command-line tool, called Make, is still widely used for building software, and it works just as well for data processing jobs.&lt;br /&gt;
&quot;&quot;&quot;&lt;br /&gt;
&lt;br /&gt;
approccio piuttosto ragionevole, e abbastanza noto. il fatto che make nasca per automatizzare le compilazioni e che quindi i tutorial siano rivolti a spiegare essenzialmente questo aspetto (&lt;a href=&quot;http://capone.mtsu.edu/csdept/FacilitiesAndResources/make.htm&quot; target=&quot;_blank&quot;&gt;ecco qui uno discreto&lt;/a&gt;) non deve spaventare.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;</content><link rel='replies' type='application/atom+xml' href='http://ockhamrazorback.blogspot.com/feeds/4044329559363012228/comments/default' title='Commenti sul post'/><link rel='replies' type='text/html' href='http://ockhamrazorback.blogspot.com/2013/01/automatismi-nella-trasformazione-di.html#comment-form' title='0 Commenti'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5155646577566105197/posts/default/4044329559363012228'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5155646577566105197/posts/default/4044329559363012228'/><link rel='alternate' type='text/html' href='http://ockhamrazorback.blogspot.com/2013/01/automatismi-nella-trasformazione-di.html' title='automatismi nella trasformazione di dati, con make'/><author><name>gpciceri</name><uri>http://www.blogger.com/profile/07362450610863294854</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh5Jjco_6vmzsI4Vd0z3epQ8mZkdYgCq5c_sr6VP9O2gdapmIICPtssrlWi_UIwuNPdDY9xUB3TiAJf8Qs40xnyGOZ0MOH5f5rD92ufyPfzFYtCFhkA_yt4rE_Mv6vcwMg/s113/fotoProfiloGpciceri_20150729.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5155646577566105197.post-5841181936753734699</id><published>2013-01-21T23:51:00.001+01:00</published><updated>2013-01-21T23:53:04.745+01:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="C"/><category scheme="http://www.blogger.com/atom/ns#" term="distanza"/><category scheme="http://www.blogger.com/atom/ns#" term="python"/><category scheme="http://www.blogger.com/atom/ns#" term="stringhe"/><title type='text'>distanza tra due stringhe, la metrica di Levenshtein</title><content type='html'>al solito wikipedìa spiega tutto, &lt;a href=&quot;http://it.wikipedia.org/wiki/Distanza_di_Levenshtein&quot;&gt;it.wikipedia.org/wiki/Distanza_di_Levenshtein&lt;/a&gt;. in sintesi: la distanza di Levenshtein tra due stringhe A e B è il numero minimo di modifiche elementari che consentono di trasformare la A nella B dove per modifica elementare si intende: la cancellazione di un carattere ovvero la sostituzione di un carattere con un altro oppure l&#39;inserimento di un carattere.&lt;br /&gt;
&lt;br /&gt;
per cortesia non reimplementiamo da scratch il calcolo della distanza: c&#39;è chi ci ha già ben pensato. &lt;a href=&quot;http://code.google.com/p/pylevenshtein/&quot; target=&quot;_blank&quot;&gt;ecco qui una libreria C assieme al wrapper per utilizzarla da python.&lt;/a&gt;&amp;nbsp;cosa fornisce: le funzioni per il calcolo delle distanze (sono disponibili altre metriche oltre alla Levenshtein) ad elevate prestazioni ed una classe, StringMatcher.py, per utilizzarla con semplicità.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;</content><link rel='replies' type='application/atom+xml' href='http://ockhamrazorback.blogspot.com/feeds/5841181936753734699/comments/default' title='Commenti sul post'/><link rel='replies' type='text/html' href='http://ockhamrazorback.blogspot.com/2013/01/distanza-tra-due-stringhe-la-metrica-di.html#comment-form' title='0 Commenti'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5155646577566105197/posts/default/5841181936753734699'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5155646577566105197/posts/default/5841181936753734699'/><link rel='alternate' type='text/html' href='http://ockhamrazorback.blogspot.com/2013/01/distanza-tra-due-stringhe-la-metrica-di.html' title='distanza tra due stringhe, la metrica di Levenshtein'/><author><name>gpciceri</name><uri>http://www.blogger.com/profile/07362450610863294854</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh5Jjco_6vmzsI4Vd0z3epQ8mZkdYgCq5c_sr6VP9O2gdapmIICPtssrlWi_UIwuNPdDY9xUB3TiAJf8Qs40xnyGOZ0MOH5f5rD92ufyPfzFYtCFhkA_yt4rE_Mv6vcwMg/s113/fotoProfiloGpciceri_20150729.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5155646577566105197.post-3152668663991581539</id><published>2013-01-21T21:31:00.000+01:00</published><updated>2013-01-21T22:29:36.405+01:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="MPI"/><category scheme="http://www.blogger.com/atom/ns#" term="python"/><category scheme="http://www.blogger.com/atom/ns#" term="serializzazione"/><title type='text'>MessagePack: impacchettatore di oggetti, efficiente</title><content type='html'>oggi mi sono imbattuto in &lt;a href=&quot;http://msgpack.org/&quot; target=&quot;_blank&quot;&gt;MessagePack: un protocollo di serializzazione&lt;/a&gt; binario efficiente. Ecco cosa promette, copiato-e-incollato dal sito.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
MessagePack is an efficient binary &lt;a href=&quot;http://en.wikipedia.org/wiki/Serialization&quot; target=&quot;_blank&quot;&gt;serialization format&lt;/a&gt;. It lets you exchange data among multiple languages like JSON but it&#39;s faster and smaller. For example, small integers (like flags or error code) are encoded into a single byte, and typical short strings only require an extra byte in addition to the strings themselves.&lt;br /&gt;
&lt;br /&gt;
visto poi che acclarati guru del ramo come salvatore sanfilippo, autore del &lt;a href=&quot;http://redis.io/&quot; target=&quot;_blank&quot;&gt;database futurista (sarebbe noSQL, futurista fa più chic) Redis&lt;/a&gt;, hanno gradito, mi sono detto: devo farci un giro. ecco fatto: intanto riesco a compilare il modulo con il mio pitone portatile su chiavetta USB (e visto che ci sono pezzi in cython non era poi così scontato) - per un primo stupidissimo test di efficienza del serializzato ecco qui:&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEggzkyEJPF8-jzxdZseJdxuYkoxPyJk0aW-YjiDItqH9U5ZAMFEb2XI9PyAFcs5QepT_f5gmc7qjVf70b5FI85SHcCEogy08h38IA37_xdzF5-0km-nGt_aS7lJ2Y-YGOQMibGge5sAaWI/s1600/21-01-2013+21.28.53-screenshot..jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEggzkyEJPF8-jzxdZseJdxuYkoxPyJk0aW-YjiDItqH9U5ZAMFEb2XI9PyAFcs5QepT_f5gmc7qjVf70b5FI85SHcCEogy08h38IA37_xdzF5-0km-nGt_aS7lJ2Y-YGOQMibGge5sAaWI/s1600/21-01-2013+21.28.53-screenshot..jpg&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
(e le prime due soluzioni sono pure python-specifiche) interessante, ma cosa ce ne facciamo? aspetta di dover mandare messaggi corposi tra un nodo ed un altro di un programma MPI e vedrai se non torna utile.</content><link rel='replies' type='application/atom+xml' href='http://ockhamrazorback.blogspot.com/feeds/3152668663991581539/comments/default' title='Commenti sul post'/><link rel='replies' type='text/html' href='http://ockhamrazorback.blogspot.com/2013/01/messagepack-impacchettatore-di-oggetti.html#comment-form' title='0 Commenti'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5155646577566105197/posts/default/3152668663991581539'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5155646577566105197/posts/default/3152668663991581539'/><link rel='alternate' type='text/html' href='http://ockhamrazorback.blogspot.com/2013/01/messagepack-impacchettatore-di-oggetti.html' title='MessagePack: impacchettatore di oggetti, efficiente'/><author><name>gpciceri</name><uri>http://www.blogger.com/profile/07362450610863294854</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh5Jjco_6vmzsI4Vd0z3epQ8mZkdYgCq5c_sr6VP9O2gdapmIICPtssrlWi_UIwuNPdDY9xUB3TiAJf8Qs40xnyGOZ0MOH5f5rD92ufyPfzFYtCFhkA_yt4rE_Mv6vcwMg/s113/fotoProfiloGpciceri_20150729.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEggzkyEJPF8-jzxdZseJdxuYkoxPyJk0aW-YjiDItqH9U5ZAMFEb2XI9PyAFcs5QepT_f5gmc7qjVf70b5FI85SHcCEogy08h38IA37_xdzF5-0km-nGt_aS7lJ2Y-YGOQMibGge5sAaWI/s72-c/21-01-2013+21.28.53-screenshot..jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5155646577566105197.post-1990947955596304323</id><published>2013-01-20T14:55:00.000+01:00</published><updated>2013-01-20T15:59:28.699+01:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="openmpi"/><category scheme="http://www.blogger.com/atom/ns#" term="processori virtuali"/><category scheme="http://www.blogger.com/atom/ns#" term="ubuntu"/><category scheme="http://www.blogger.com/atom/ns#" term="virtualbox"/><title type='text'>il supercomputer della domenica pomeriggio</title><content type='html'>vabbè, un po&#39; vi sto imbrogliando, visto che avevo già installato sia &lt;a href=&quot;http://www.virtualbox.org/&quot; target=&quot;_blank&quot;&gt;VirtualBox&lt;/a&gt;&amp;nbsp;che &lt;a href=&quot;http://www.ubuntu-it.org/download&quot; target=&quot;_blank&quot;&gt;un&#39;immagine di ubuntu&lt;/a&gt;&amp;nbsp;(l&#39;ultima che ho trovato e scelto è la 12.10 a 32 bit). ad ogni modo, vero divertissment della domenica pomeriggio piovosa, basta seguire &lt;a href=&quot;http://techtinkering.com/2009/12/02/setting-up-a-beowulf-cluster-using-open-mpi-on-linux/&quot; target=&quot;_blank&quot;&gt;questo bel tutorial&lt;/a&gt; per avere nel giro di mezz&#39;ora a disposizione un supercomputer giocattolo - io sul mio iCore3 ho configurato ubuntu a vedere due processori virtuali - con cui provare tutti gli algoritmi prima di passarli sul solito, mostruoso, 2**n-core.</content><link rel='replies' type='application/atom+xml' href='http://ockhamrazorback.blogspot.com/feeds/1990947955596304323/comments/default' title='Commenti sul post'/><link rel='replies' type='text/html' href='http://ockhamrazorback.blogspot.com/2013/01/il-supercomputer-della-domenica.html#comment-form' title='0 Commenti'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5155646577566105197/posts/default/1990947955596304323'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5155646577566105197/posts/default/1990947955596304323'/><link rel='alternate' type='text/html' href='http://ockhamrazorback.blogspot.com/2013/01/il-supercomputer-della-domenica.html' title='il supercomputer della domenica pomeriggio'/><author><name>gpciceri</name><uri>http://www.blogger.com/profile/07362450610863294854</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh5Jjco_6vmzsI4Vd0z3epQ8mZkdYgCq5c_sr6VP9O2gdapmIICPtssrlWi_UIwuNPdDY9xUB3TiAJf8Qs40xnyGOZ0MOH5f5rD92ufyPfzFYtCFhkA_yt4rE_Mv6vcwMg/s113/fotoProfiloGpciceri_20150729.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5155646577566105197.post-2991689727636569494</id><published>2013-01-20T11:14:00.000+01:00</published><updated>2013-01-20T14:46:02.566+01:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="nose"/><category scheme="http://www.blogger.com/atom/ns#" term="python"/><category scheme="http://www.blogger.com/atom/ns#" term="unit testing"/><title type='text'>data-driven unit test con python e nose</title><content type='html'>un modo, molto potente, per controllare se un file che ci arriva in input è sia formalmente (riguardo alla &quot;fisicità&quot;, la rappresentazione concreta dei dati che contiene) che semanticamente (riguardo al &quot;significato&quot; logico dei dati che contiene) corretto consiste nel metterlo sotto unit testing - di controllarlo cioè con un programma diagnostico che ne analizzi i contenuti eseguendo test sistematici. in questo modo ogni volta che riceveremo un file di contenuto analogo potremo verificarne la correttezza automagicamente.&lt;br /&gt;
&lt;br /&gt;
se i dati sono suddivisibili per riga, cioè ogni riga nel file è l&#39;espressione compiuta di quello che ci interessa, tutto si riduce a fare una serie di controlli - virtualmente sempre gli stessi - per ogni riga del file; in questo caso possiamo ricorrere al DDUT (data-driven unit testing) dove i test sono appunto innescati dalla singola riga della struttura dati che guida l&#39;elaborazione, nel nostro caso il file in input.&lt;br /&gt;
&lt;br /&gt;
In pratica, con python e &lt;a href=&quot;http://nose.readthedocs.org/en/latest/index.html&quot; target=&quot;_blank&quot;&gt;nose (un framework di automazione per i test)&lt;/a&gt;&amp;nbsp;, il procedimento è semplicissimo: prendiamo ad esempio un piccolo file di da&lt;span style=&quot;font-family: inherit;&quot;&gt;ti,&amp;nbsp;mydata.txt (in ambiente windows, dove il separatore di riga è tradizionalmente lo &quot;\r\n&quot;)&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;0123456789&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;0123456&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;0123456789 &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;01234567890123456789&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;0123456789&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
dove ci piacerebbe essere certi (esempio di verifica formale) che tutte le righe siano lunghe 10: la classe di test che ci aiuta a fare tutto questo è molto semplice.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;class Test_DataDriven():&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; @classmethod&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; def setupClass(self):&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; self.infile = open(&quot;mydata.txt&quot;, &quot;rb&quot;)&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; @classmethod&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; def teardownClass(self):&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; self.infile.close()&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; def test_datarow(self):&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; for row in self.infile:&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; yield self.check_rowlen, row.rstrip(&quot;\r\n&quot;)&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; def check_rowlen(self, arow):&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; assert len(arow) == 10&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;cosa succede: entra in azione nosetests - una tantum (nella setupClass) il file-guida viene aperto e per ogni sua riga (in test_datarow) viene richiamato il controllo di lunghezza (test_datarow genera infatti il test implementato poi in check_rowlen). il file viene poi chiuso alla fine di tutti i test (tearDown). il framework nose, che qui interviene con il programma driver nosetests eseguito sui test d&#39;esempio, usa un sistema di convenzioni sui nomi delle classi e dei metodi per capire cosa fare.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;come quasi ogni esempio didattico è decisamente sovrastrutturale rispetto al risultato, ma l&#39;impostazione permette di essere estesa elegantemente a controlli di ben altra complessità.&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;</content><link rel='replies' type='application/atom+xml' href='http://ockhamrazorback.blogspot.com/feeds/2991689727636569494/comments/default' title='Commenti sul post'/><link rel='replies' type='text/html' href='http://ockhamrazorback.blogspot.com/2013/01/data-driven-unit-test-con-python-e-nose.html#comment-form' title='0 Commenti'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5155646577566105197/posts/default/2991689727636569494'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5155646577566105197/posts/default/2991689727636569494'/><link rel='alternate' type='text/html' href='http://ockhamrazorback.blogspot.com/2013/01/data-driven-unit-test-con-python-e-nose.html' title='data-driven unit test con python e nose'/><author><name>gpciceri</name><uri>http://www.blogger.com/profile/07362450610863294854</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh5Jjco_6vmzsI4Vd0z3epQ8mZkdYgCq5c_sr6VP9O2gdapmIICPtssrlWi_UIwuNPdDY9xUB3TiAJf8Qs40xnyGOZ0MOH5f5rD92ufyPfzFYtCFhkA_yt4rE_Mv6vcwMg/s113/fotoProfiloGpciceri_20150729.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5155646577566105197.post-4774548043940846789</id><published>2013-01-13T22:39:00.000+01:00</published><updated>2013-01-13T22:39:30.649+01:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="pypar"/><category scheme="http://www.blogger.com/atom/ns#" term="python"/><title type='text'>un pattern per semplificare la parallelizzazione di codice scientifico</title><content type='html'>questo articolo è abbastanza carino... almeno per la didattica.&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;http://iopscience.iop.org/1749-4699/3/1/015003/fulltext/&quot; rel=&quot;nofollow&quot; target=&quot;_blank&quot;&gt;Simplifying the parallelization of scientific codes by a function-centric approach in Python&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
The purpose of this paper is to show how existing scientific software can be parallelized using a separate thin layer of Python code where all parallelization-specific tasks are implemented....The overall programming effort needed by this parallelization approach is limited, and the resulting parallel Python scripts have a compact and clean structure.&lt;br /&gt;
&lt;br /&gt;
in sintesi&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;A generic Python function that implements the three-step parameter analysis can be as follows:&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;def solve_problems(initialize, func, finalize):&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; input_args = initialize()&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; output = [func(*args, **args) for args, kwargs in input_args]&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; finalize(output)&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;The initialize, func and finalize functions, which are independent of solve_problem, are passed as input arguments.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;nulla di così innovativo, l&#39;uso della struttura a tre passi: inizio-faccio-finisco è un vero e proprio deja vu: l&#39;ho già visto in concettualizzazioni tipo il design by contract, il setup/teardown dello unit testing ed anche nel mapReduce.&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
</content><link rel='replies' type='application/atom+xml' href='http://ockhamrazorback.blogspot.com/feeds/4774548043940846789/comments/default' title='Commenti sul post'/><link rel='replies' type='text/html' href='http://ockhamrazorback.blogspot.com/2013/01/un-pattern-per-semplificare-la.html#comment-form' title='0 Commenti'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5155646577566105197/posts/default/4774548043940846789'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5155646577566105197/posts/default/4774548043940846789'/><link rel='alternate' type='text/html' href='http://ockhamrazorback.blogspot.com/2013/01/un-pattern-per-semplificare-la.html' title='un pattern per semplificare la parallelizzazione di codice scientifico'/><author><name>gpciceri</name><uri>http://www.blogger.com/profile/07362450610863294854</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh5Jjco_6vmzsI4Vd0z3epQ8mZkdYgCq5c_sr6VP9O2gdapmIICPtssrlWi_UIwuNPdDY9xUB3TiAJf8Qs40xnyGOZ0MOH5f5rD92ufyPfzFYtCFhkA_yt4rE_Mv6vcwMg/s113/fotoProfiloGpciceri_20150729.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5155646577566105197.post-1840726198777094518</id><published>2013-01-11T18:45:00.000+01:00</published><updated>2013-01-11T18:46:56.451+01:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="ipython"/><category scheme="http://www.blogger.com/atom/ns#" term="python"/><category scheme="http://www.blogger.com/atom/ns#" term="zeromq"/><title type='text'>IPython: il pitone, molto interattivo e paralelo</title><content type='html'>&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
Dall&#39;introduzione all&#39;intervento (marzo 2012, non proprio preistoria)&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&quot;&quot;&quot;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
Today, IPython consists of a kernel that executes the user code and controls the user&#39;s namespace, and a collection of tools to control this kernel either in-process or out-of-process thanks to a well-specified communications protocol implemented over ZeroMQ. The kernel can do much more than execute user code, including introspection of objects in the user&#39;s namespace, detailed error reporting with rich tracebacks, history logging of inputs and outputs with an SQLite backend, a user-extensible system of commands for interactive control that don&#39;t collide with user variables, and much more.&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&quot;&quot;&quot;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
Sono più di tre ore di video, ma interessanti.&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;iframe allowfullscreen=&#39;allowfullscreen&#39; webkitallowfullscreen=&#39;webkitallowfullscreen&#39; mozallowfullscreen=&#39;mozallowfullscreen&#39; width=&#39;320&#39; height=&#39;266&#39; src=&#39;https://www.youtube.com/embed/2G5YTlheCbw?feature=player_embedded&#39; frameborder=&#39;0&#39;&gt;&lt;/iframe&gt;&lt;/div&gt;
&lt;br /&gt;
e anche la trascrizione dell&#39;intervento è &lt;a href=&quot;http://pycon-2012-notes.readthedocs.org/en/latest/ipython.html&quot; target=&quot;_blank&quot;&gt;disponibile online qui&lt;/a&gt;.</content><link rel='replies' type='application/atom+xml' href='http://ockhamrazorback.blogspot.com/feeds/1840726198777094518/comments/default' title='Commenti sul post'/><link rel='replies' type='text/html' href='http://ockhamrazorback.blogspot.com/2013/01/ipython-il-pitone-molto-interattivo-e.html#comment-form' title='0 Commenti'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5155646577566105197/posts/default/1840726198777094518'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5155646577566105197/posts/default/1840726198777094518'/><link rel='alternate' type='text/html' href='http://ockhamrazorback.blogspot.com/2013/01/ipython-il-pitone-molto-interattivo-e.html' title='IPython: il pitone, molto interattivo e paralelo'/><author><name>gpciceri</name><uri>http://www.blogger.com/profile/07362450610863294854</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh5Jjco_6vmzsI4Vd0z3epQ8mZkdYgCq5c_sr6VP9O2gdapmIICPtssrlWi_UIwuNPdDY9xUB3TiAJf8Qs40xnyGOZ0MOH5f5rD92ufyPfzFYtCFhkA_yt4rE_Mv6vcwMg/s113/fotoProfiloGpciceri_20150729.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5155646577566105197.post-2087286587524547070</id><published>2013-01-08T19:18:00.003+01:00</published><updated>2013-01-08T19:44:12.245+01:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="mapreduce"/><category scheme="http://www.blogger.com/atom/ns#" term="message passing"/><category scheme="http://www.blogger.com/atom/ns#" term="MPI"/><category scheme="http://www.blogger.com/atom/ns#" term="pypar"/><category scheme="http://www.blogger.com/atom/ns#" term="python"/><title type='text'>pypar: livello sei, a volte ritornano</title><content type='html'>&lt;br /&gt;
Più di dieci anni fa, ebbi il discreto privilegio di contribuire quattro righe di codice a questo progettino opensource, pypar. Di cosa si tratta?&amp;nbsp;&lt;a href=&quot;http://code.google.com/p/pypar/&quot; rel=&quot;nofollow&quot; target=&quot;_blank&quot;&gt;Pypar is an efficient but easy-to-use module&lt;/a&gt; that allows programs written in Python to run in parallel on multiple processors and communicate using message passing. Pypar provides bindings to a subset of the &lt;a href=&quot;http://en.wikipedia.org/wiki/Message_Passing_Interface&quot; rel=&quot;nofollow&quot; target=&quot;_blank&quot;&gt;message passing interface standard MPI&lt;/a&gt;.&lt;br /&gt;
&lt;br /&gt;
Poi, con il tempo, qualcuno di buona volontà ci ha pure ricamato sopra un pattern utile per affrontare i cosiddetti &lt;a href=&quot;http://en.wikipedia.org/wiki/Embarrassingly_parallel&quot; rel=&quot;nofollow&quot; target=&quot;_blank&quot;&gt;problemi embarrassingly parallel&lt;/a&gt;&amp;nbsp;(ed è un pattern di utilizzo comune). Come dire, del maiale non si butta via nulla:&amp;nbsp;&lt;a href=&quot;http://www.shocksolution.com/2010/04/managing-a-pool-of-mpi-processes-with-python-and-pypar/&quot; rel=&quot;nofollow&quot; target=&quot;_blank&quot;&gt;il risultato finale lo puoi trovare qui&lt;/a&gt;, la sua valenza didattica resta intatta.&lt;br /&gt;
&lt;br /&gt;
Certo, adesso che è un po&#39; di tempo che va di moda il MapReduce, tutto potrebbe sembrare demodè: ma il pypar ha da dire la sua anche in questo caso;&amp;nbsp;&lt;a href=&quot;http://mapreduce.sandia.gov/&quot; rel=&quot;nofollow&quot; target=&quot;_blank&quot;&gt;la&amp;nbsp;MapReduce-MPI Library&lt;/a&gt; ne fa infatti buon uso.&lt;br /&gt;
&lt;br /&gt;
Quando ho un po&#39; di tempo provo a rimettere su l&#39;ambiente.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;</content><link rel='replies' type='application/atom+xml' href='http://ockhamrazorback.blogspot.com/feeds/2087286587524547070/comments/default' title='Commenti sul post'/><link rel='replies' type='text/html' href='http://ockhamrazorback.blogspot.com/2013/01/pypar-livello-sei-volte-ritornano.html#comment-form' title='0 Commenti'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5155646577566105197/posts/default/2087286587524547070'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5155646577566105197/posts/default/2087286587524547070'/><link rel='alternate' type='text/html' href='http://ockhamrazorback.blogspot.com/2013/01/pypar-livello-sei-volte-ritornano.html' title='pypar: livello sei, a volte ritornano'/><author><name>gpciceri</name><uri>http://www.blogger.com/profile/07362450610863294854</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh5Jjco_6vmzsI4Vd0z3epQ8mZkdYgCq5c_sr6VP9O2gdapmIICPtssrlWi_UIwuNPdDY9xUB3TiAJf8Qs40xnyGOZ0MOH5f5rD92ufyPfzFYtCFhkA_yt4rE_Mv6vcwMg/s113/fotoProfiloGpciceri_20150729.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5155646577566105197.post-545690454355147497</id><published>2013-01-08T12:19:00.002+01:00</published><updated>2013-01-08T12:25:59.633+01:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="configurazione"/><category scheme="http://www.blogger.com/atom/ns#" term="portableApps"/><title type='text'>la Console Portable, questa misconosciuta</title><content type='html'>Per gli intrippati delle Portableapps (&lt;a href=&quot;http://www.portableapps.com/&quot; rel=&quot;nofollow&quot; target=&quot;_blank&quot;&gt;clicca qui per entrare nel tunnel&lt;/a&gt;) la Console, ovviamente portatile, è una shell da provare (anche perchè quella standard di winzozz..., brrrrr che paura). Da me funzionicchia, solo che trovare come si personalizza (ad esempio per aggiungere directory al PATH) non è stato proprio immediato. Aspetta che spiego.&lt;br /&gt;
&lt;br /&gt;
Il file da modificare è&amp;nbsp;ConsolePortable.ini e si trova&amp;nbsp;sotto&amp;nbsp;&lt;span style=&quot;font-family: inherit;&quot;&gt;%PAL:PortableAppsDir%\C&lt;/span&gt;onsolePortable\App\AppInfo\Launcher.&lt;br /&gt;
&lt;br /&gt;
Ma è carino sapere come si fa ad evitare di scrivere percorsi fissi (visto che non sappiamo dove verrà montato il disco, la prossima volta). Ecco qualche riga di esempio tratta dal mio - occhio alle variabili che iniziano per PAL:, fanno tutto loro.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;[Environment]&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;PALMinGWDir=%PAL:PortableAppsDir%\CommonFiles\MinGW&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;PALMsysDir=%PAL:PortableAppsDir%\MSYSPortable\App\MSYS&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;PALUnxUtilsDir=%PAL:Drive%\UnxUtils&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;PALOpenSSLDir=%PAL:Drive%\OpenSSL-Win32&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;PALPython=%PAL:Drive%\Portable Python 2.7.3.1&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;PALPerl=%PAL:Drive%\Perl&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;PALHDF5=%PAL:Drive%\HDF_Group\HDF5\win32\1.8.10&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;PATH=%PALPython%\App;%PALPython%\App\Scripts;%PALMinGWDir%\bin;%PALMsysDir%\bin;%PATH%;%PAL:Drive%\bin;%PALPerl%\perl\bin;%PALHDF5%\bin;%PALOpenSSLDir%\bin;%PALUnxUtilsDir%\usr\local\wbin;%PAL:DataDir%\scripts&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;ConsolePortableScripts=%PAL:DataDir%\scripts&lt;/span&gt;</content><link rel='replies' type='application/atom+xml' href='http://ockhamrazorback.blogspot.com/feeds/545690454355147497/comments/default' title='Commenti sul post'/><link rel='replies' type='text/html' href='http://ockhamrazorback.blogspot.com/2013/01/la-console-portable-questa-misconosciuta.html#comment-form' title='0 Commenti'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5155646577566105197/posts/default/545690454355147497'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5155646577566105197/posts/default/545690454355147497'/><link rel='alternate' type='text/html' href='http://ockhamrazorback.blogspot.com/2013/01/la-console-portable-questa-misconosciuta.html' title='la Console Portable, questa misconosciuta'/><author><name>gpciceri</name><uri>http://www.blogger.com/profile/07362450610863294854</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh5Jjco_6vmzsI4Vd0z3epQ8mZkdYgCq5c_sr6VP9O2gdapmIICPtssrlWi_UIwuNPdDY9xUB3TiAJf8Qs40xnyGOZ0MOH5f5rD92ufyPfzFYtCFhkA_yt4rE_Mv6vcwMg/s113/fotoProfiloGpciceri_20150729.jpg'/></author><thr:total>0</thr:total></entry></feed>