<?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/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>Jack &#38; Hack</title>
	<atom:link href="http://jbcabral.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://jbcabral.com</link>
	<description>Hacking, food and wiskey</description>
	<lastBuildDate>Tue, 24 Apr 2012 01:15:54 +0000</lastBuildDate>
	<language>es</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='jbcabral.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://0.gravatar.com/blavatar/004a1bfc0f48a3a8eae89b60434b6fd6?s=96&#038;d=http%3A%2F%2Fs2.wp.com%2Fi%2Fbuttonw-com.png</url>
		<title>Jack &#38; Hack</title>
		<link>http://jbcabral.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://jbcabral.com/osd.xml" title="Jack &#38; Hack" />
	<atom:link rel='hub' href='http://jbcabral.com/?pushpress=hub'/>
		<item>
		<title>Snippet para usar un unittest bottle.py con un proceso separado</title>
		<link>http://jbcabral.com/2012/04/13/snippet-para-usar-un-unittest-bottle-py-con-un-proceso-separado/</link>
		<comments>http://jbcabral.com/2012/04/13/snippet-para-usar-un-unittest-bottle-py-con-un-proceso-separado/#comments</comments>
		<pubDate>Fri, 13 Apr 2012 14:39:06 +0000</pubDate>
		<dc:creator>JuanBC</dc:creator>
				<category><![CDATA[Free Software]]></category>
		<category><![CDATA[gpl v3]]></category>
		<category><![CDATA[Informatica]]></category>
		<category><![CDATA[OpenSource]]></category>
		<category><![CDATA[Programación]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[bottle]]></category>
		<category><![CDATA[multiprocessing]]></category>
		<category><![CDATA[snippet]]></category>
		<category><![CDATA[testcase]]></category>

		<guid isPermaLink="false">http://jbcabral.com/?p=877</guid>
		<description><![CDATA[Necsitaba probar un api rest y se me ocurrio levantar bottle en un proceso separado dentro de un testcase; y necesite hacer todos este chicle.<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jbcabral.com&amp;blog=2055049&amp;post=877&amp;subd=jbcabral&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Necsitaba probar un api rest y se me ocurrio levantar bottle en un proceso separado dentro de un testcase; y necesite hacer todos este chicle.</p>
<p><pre class="brush: python;">
#!/usr/bin/env python
# -*- coding: utf-8 -*-

# &quot;THE WISKEY-WARE LICENSE&quot;:
# &lt;jbc.develop@gmail.com&gt; wrote this file. As long as you retain this notice you
# can do whatever you want with this stuff. If we meet some day, and you think
# this stuff is worth it, you can buy me a WISKEY in return Juan BC

import multiprocessing
import urllib2
import unittest

import bottle

class BottleTest(unittest.TestCase):

    def setUp(self):
        self.process = multiprocessing.Process(
            target=bottle.run,
            kwargs={&quot;port&quot;: &quot;8081&quot;}
        )
        self.process.start()

        # wait until bottle process full started
        # si no ponen esto el testcase se va a ejecutar antes
        # que bottle este listo para recibir peticiones
        started = False
        while not started:
            try:
                urllib2.urlopen(&quot;http://127.0.0.1:8081/&quot;)
            except urllib2.HTTPError:
                started = True
            except urllib2.URLError as err:
                if err.reason.args[0] == 111:
                    pass
                else:
                    raise err
            else:
                started = True

    def tearDown(self):
        self.process.terminate()

    def test_something(self):
        pass
</pre></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/jbcabral.wordpress.com/877/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/jbcabral.wordpress.com/877/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/jbcabral.wordpress.com/877/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/jbcabral.wordpress.com/877/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/jbcabral.wordpress.com/877/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/jbcabral.wordpress.com/877/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/jbcabral.wordpress.com/877/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/jbcabral.wordpress.com/877/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/jbcabral.wordpress.com/877/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/jbcabral.wordpress.com/877/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/jbcabral.wordpress.com/877/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/jbcabral.wordpress.com/877/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/jbcabral.wordpress.com/877/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/jbcabral.wordpress.com/877/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jbcabral.com&amp;blog=2055049&amp;post=877&amp;subd=jbcabral&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://jbcabral.com/2012/04/13/snippet-para-usar-un-unittest-bottle-py-con-un-proceso-separado/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/39f5d667c6e5652a646a0e3c4afd0df2?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">JuanBC</media:title>
		</media:content>
	</item>
		<item>
		<title>Android como SO de desarrollo</title>
		<link>http://jbcabral.com/2012/03/12/android-como-so-de-desarrollo/</link>
		<comments>http://jbcabral.com/2012/03/12/android-como-so-de-desarrollo/#comments</comments>
		<pubDate>Mon, 12 Mar 2012 19:01:01 +0000</pubDate>
		<dc:creator>JuanBC</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[Programación]]></category>
		<category><![CDATA[android]]></category>
		<category><![CDATA[programacion]]></category>
		<category><![CDATA[python]]></category>

		<guid isPermaLink="false">https://jbcabral.wordpress.com/?p=850</guid>
		<description><![CDATA[Android es hoy por hoy el SO con crecimiento mas rápido en el mercado.  Todos los días se despliegan miles de veces esta tecnología para hacer funcionar celulares, tablets y otros bichos portátiles. Recientemente me compre una Asus Transformer; que es una tablet &#8220;convertible en netbook&#8221;.  La realidad es que es un dispositivo muy cómodo, [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jbcabral.com&amp;blog=2055049&amp;post=850&amp;subd=jbcabral&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Android es hoy por hoy el SO con crecimiento mas rápido en el mercado.  Todos los días se despliegan miles de veces esta tecnología para hacer funcionar celulares, tablets y otros bichos portátiles.</p>
<p>Recientemente me compre una Asus Transformer; que es una tablet &#8220;convertible en netbook&#8221;.  La realidad es que es un dispositivo muy cómodo, ligero y con una autonomía que llega a las 16 hs. En un principio me dispuse a instalarle un linux para utilizarla como dispositivo ultra portátil de desarrollo pero desistí por un poco de fiaca y por los motivos que acompañan a este post.</p>
<p><img title="2012-03-11_19-09-25_746.jpg" class="alignnone" alt="image" src="http://jbcabral.files.wordpress.com/2012/03/wpid-2012-03-11_19-09-25_746.jpg?w=630" /> </p>
<p>Android, se programa en java. Yo programo en java&#8230; y en python, php, lisp, xstl y javascript; pero bueno&#8230; prefiero python. Así que con esto en mente me instale el &#8220;Scripting Layer 4 Android&#8221; y sus componentes python me compre una aplicación genial que se llama &#8220;DroidEdit&#8221; por 4 pesos argentinos&#8230; y me puse manos a la obra.</p>
<p><img title="Screenshot_2012-03-16-22-35-27.jpg" class="alignnone" alt="image" src="http://jbcabral.files.wordpress.com/2012/03/wpid-screenshot_2012-03-16-22-35-27.jpg?w=630" /> </p>
<p>Pero: todo esto no es mas que un &#8220;parche&#8221; a lo que necesito. Python no es full python&#8230; no tengo Django ni Numpy ni NADA&#8230; no tengo Qt cómodo, el editor no corre el script de una manera sencilla&#8230; bueno &#8220;es incomodo&#8221;</p>
<p>Pense en alternativas como entrar a un server y usar allí vim o emacs; pero siguen siendo parches (a parches)</p>
<p>Por que escribo esto? como descargo&#8230; todo lo demás de android es GENIAL!!!! tenemos excelentes navegadores, reproductores miles de herramientas sociales, muy buenos juegos y mil cosas mas (esto lo escribo desde el wordpress para android).</p>
<p>Así que cuando un Python ENSERIO para android&#8230; o al menos podes programar realmente cómodo android en android seria genial (la potencia de computo de los dispositivos se la bancan)</p>
<p>A la comunidad: les avise, pronto android estará en todos lados incluso mas que linux y windows.</p>
<p>Y digo yo <strong>Android for servers</strong>  para cuando? windows parecia una utopia en su momento.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/jbcabral.wordpress.com/850/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/jbcabral.wordpress.com/850/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/jbcabral.wordpress.com/850/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/jbcabral.wordpress.com/850/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/jbcabral.wordpress.com/850/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/jbcabral.wordpress.com/850/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/jbcabral.wordpress.com/850/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/jbcabral.wordpress.com/850/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/jbcabral.wordpress.com/850/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/jbcabral.wordpress.com/850/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/jbcabral.wordpress.com/850/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/jbcabral.wordpress.com/850/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/jbcabral.wordpress.com/850/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/jbcabral.wordpress.com/850/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jbcabral.com&amp;blog=2055049&amp;post=850&amp;subd=jbcabral&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://jbcabral.com/2012/03/12/android-como-so-de-desarrollo/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/39f5d667c6e5652a646a0e3c4afd0df2?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">JuanBC</media:title>
		</media:content>

		<media:content url="http://jbcabral.files.wordpress.com/2012/03/wpid-2012-03-11_19-09-25_746.jpg" medium="image">
			<media:title type="html">2012-03-11_19-09-25_746.jpg</media:title>
		</media:content>

		<media:content url="http://jbcabral.files.wordpress.com/2012/03/wpid-screenshot_2012-03-16-22-35-27.jpg" medium="image">
			<media:title type="html">Screenshot_2012-03-16-22-35-27.jpg</media:title>
		</media:content>
	</item>
		<item>
		<title>Moví el repo de las PET</title>
		<link>http://jbcabral.com/2012/03/09/movi-el-repo-de-las-pet/</link>
		<comments>http://jbcabral.com/2012/03/09/movi-el-repo-de-las-pet/#comments</comments>
		<pubDate>Fri, 09 Mar 2012 20:08:05 +0000</pubDate>
		<dc:creator>JuanBC</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[hg]]></category>
		<category><![CDATA[pet]]></category>
		<category><![CDATA[pyar]]></category>
		<category><![CDATA[repos]]></category>
		<category><![CDATA[revista]]></category>

		<guid isPermaLink="false">http://jbcabral.com/2012/03/09/movi-el-repo-de-las-pet/</guid>
		<description><![CDATA[Por motivos de re-orden moví el repo de las revistas de PyAr pubicadas acá: https://bitbucket.org/leliel12/pet/<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jbcabral.com&amp;blog=2055049&amp;post=849&amp;subd=jbcabral&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Por motivos de re-orden moví el repo de las revistas de PyAr pubicadas acá: <a href="https://bitbucket.org/leliel12/pet/">https://bitbucket.org/leliel12/pet/</a></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/jbcabral.wordpress.com/849/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/jbcabral.wordpress.com/849/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/jbcabral.wordpress.com/849/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/jbcabral.wordpress.com/849/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/jbcabral.wordpress.com/849/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/jbcabral.wordpress.com/849/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/jbcabral.wordpress.com/849/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/jbcabral.wordpress.com/849/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/jbcabral.wordpress.com/849/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/jbcabral.wordpress.com/849/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/jbcabral.wordpress.com/849/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/jbcabral.wordpress.com/849/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/jbcabral.wordpress.com/849/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/jbcabral.wordpress.com/849/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jbcabral.com&amp;blog=2055049&amp;post=849&amp;subd=jbcabral&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://jbcabral.com/2012/03/09/movi-el-repo-de-las-pet/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/39f5d667c6e5652a646a0e3c4afd0df2?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">JuanBC</media:title>
		</media:content>
	</item>
		<item>
		<title>OUT: PET #5</title>
		<link>http://jbcabral.com/2012/03/05/out-pet-5/</link>
		<comments>http://jbcabral.com/2012/03/05/out-pet-5/#comments</comments>
		<pubDate>Mon, 05 Mar 2012 19:04:51 +0000</pubDate>
		<dc:creator>JuanBC</dc:creator>
				<category><![CDATA[python]]></category>
		<category><![CDATA[pet]]></category>
		<category><![CDATA[pyar]]></category>
		<category><![CDATA[revista]]></category>

		<guid isPermaLink="false">http://jbcabral.com/?p=843</guid>
		<description><![CDATA[Después de n meses de laburo, tengo el agrado de presentar la pet #5 http://revista.python.org.ar/ &#60;&#60;&#60; aca ta Hay notas variopintas en nuestra querida revista. Existen algunos errores de imágenes en la versión PDF pero ya lo corregiremos a medida que avance la semana Como todo release sale acompañado de las fuentes publicadas acá: https://bitbucket.org/leliel12/pet-published [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jbcabral.com&amp;blog=2055049&amp;post=843&amp;subd=jbcabral&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><img class="alignright" src="http://revista.python.org.ar/5/es/html/static/tapa-revista.png" alt="" width="351" height="464" /><br />
Después de n meses de laburo, tengo el agrado de presentar la pet #5</p>
<p><a href="http://revista.python.org.ar/">http://revista.python.org.ar/</a> &lt;&lt;&lt; aca ta</p>
<p>Hay notas variopintas en nuestra querida revista.</p>
<p>Existen algunos errores de imágenes en la versión PDF pero ya lo corregiremos a medida que avance la semana</p>
<p>Como todo release sale acompañado de las fuentes publicadas acá:<a href="https://bitbucket.org/leliel12/pet-published"> https://bitbucket.org/leliel12/pet-published</a></p>
<p>Ahora voy a comenzar una migración masiva a sphinx y luego de eso voy a empezar con la PET #6</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/jbcabral.wordpress.com/843/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/jbcabral.wordpress.com/843/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/jbcabral.wordpress.com/843/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/jbcabral.wordpress.com/843/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/jbcabral.wordpress.com/843/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/jbcabral.wordpress.com/843/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/jbcabral.wordpress.com/843/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/jbcabral.wordpress.com/843/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/jbcabral.wordpress.com/843/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/jbcabral.wordpress.com/843/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/jbcabral.wordpress.com/843/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/jbcabral.wordpress.com/843/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/jbcabral.wordpress.com/843/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/jbcabral.wordpress.com/843/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jbcabral.com&amp;blog=2055049&amp;post=843&amp;subd=jbcabral&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://jbcabral.com/2012/03/05/out-pet-5/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/39f5d667c6e5652a646a0e3c4afd0df2?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">JuanBC</media:title>
		</media:content>

		<media:content url="http://revista.python.org.ar/5/es/html/static/tapa-revista.png" medium="image" />
	</item>
		<item>
		<title>PyAr &#8211; Argentina Python User Group video</title>
		<link>http://jbcabral.com/2012/03/03/pyar-argentina-python-user-group-video/</link>
		<comments>http://jbcabral.com/2012/03/03/pyar-argentina-python-user-group-video/#comments</comments>
		<pubDate>Sat, 03 Mar 2012 05:35:37 +0000</pubDate>
		<dc:creator>JuanBC</dc:creator>
				<category><![CDATA[Informatica]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[pyar]]></category>
		<category><![CDATA[pycon]]></category>
		<category><![CDATA[pyconar]]></category>

		<guid isPermaLink="false">http://jbcabral.com/?p=828</guid>
		<description><![CDATA[este video lo hice para presentarlo como charla relámpago en pycon us 2012. además anuncia la fecha de pycon ar 2012<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jbcabral.com&amp;blog=2055049&amp;post=828&amp;subd=jbcabral&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p style="text-align:center;"><a href="http://animoto.com/play/Uiqk9VQDUSDL0wIa3oMLKQ"><img class="size-full wp-image-834 aligncenter" title="2012-03-03-124227_650x359_scrot" src="http://jbcabral.files.wordpress.com/2012/03/2012-03-03-124227_650x359_scrot.png?w=630&#038;h=347" alt="" width="630" height="347" /></a></p>
<p>este video lo hice para presentarlo como charla relámpago en pycon us 2012. además anuncia la fecha de pycon ar 2012</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/jbcabral.wordpress.com/828/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/jbcabral.wordpress.com/828/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/jbcabral.wordpress.com/828/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/jbcabral.wordpress.com/828/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/jbcabral.wordpress.com/828/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/jbcabral.wordpress.com/828/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/jbcabral.wordpress.com/828/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/jbcabral.wordpress.com/828/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/jbcabral.wordpress.com/828/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/jbcabral.wordpress.com/828/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/jbcabral.wordpress.com/828/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/jbcabral.wordpress.com/828/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/jbcabral.wordpress.com/828/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/jbcabral.wordpress.com/828/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jbcabral.com&amp;blog=2055049&amp;post=828&amp;subd=jbcabral&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://jbcabral.com/2012/03/03/pyar-argentina-python-user-group-video/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/39f5d667c6e5652a646a0e3c4afd0df2?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">JuanBC</media:title>
		</media:content>

		<media:content url="http://jbcabral.files.wordpress.com/2012/03/2012-03-03-124227_650x359_scrot.png" medium="image">
			<media:title type="html">2012-03-03-124227_650x359_scrot</media:title>
		</media:content>
	</item>
		<item>
		<title>Licor de vainilla</title>
		<link>http://jbcabral.com/2012/02/04/licor-de-vainilla/</link>
		<comments>http://jbcabral.com/2012/02/04/licor-de-vainilla/#comments</comments>
		<pubDate>Sun, 05 Feb 2012 01:20:45 +0000</pubDate>
		<dc:creator>JuanBC</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[bebida]]></category>
		<category><![CDATA[comida]]></category>
		<category><![CDATA[licor]]></category>
		<category><![CDATA[receta]]></category>
		<category><![CDATA[vainilla]]></category>

		<guid isPermaLink="false">http://jbcabral.com/?p=744</guid>
		<description><![CDATA[Hacia rato que no publicaba una entrada sobre alguna receta; y como tenia que hacer un regalo a una amiga (por nada especial, sino por una promesa) me digno a compartir una receta de manufactura propia. Ingredientes: 1 chaucha de vainilla (se consigue en dietéticas  por mas o menos 15 pesos argentinos) Alcohol etílico (del que [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jbcabral.com&amp;blog=2055049&amp;post=744&amp;subd=jbcabral&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Hacia rato que no publicaba una entrada sobre alguna receta; y como tenia que hacer un regalo a una amiga (por nada especial, sino por una promesa) me digno a compartir una receta de manufactura propia.</p>
<p><strong>Ingredientes:</strong></p>
<ul>
<li>1 chaucha de vainilla (se consigue en dietéticas  por mas o menos 15 pesos argentinos)</li>
<li>Alcohol etílico (del que se puede tomar).</li>
<li>Ginebra.</li>
<li>Azúcar.</li>
<li>Agua.</li>
<li>1 botella bonita (en mi caso elegí una de <a href="http://www.buenbeber.com.ar/media/catalog/product/cache/1/image/5e06319eda06f020e43594a9c230972d/i/m/img_2_1.jpg">Wisky HiramWalker</a> que es baratisimo)</li>
<li>1 cacho de esencia de vainilla para ir catando.</li>
<li>1 vela.</li>
</ul>
<p><strong>Preparación:</strong></p>
<ul>
<li>Preparar almimbar hirviendo agua con azúcar a gusto (tan dulce como prefieran) agregando al final unas gotas de esencia de vainilla.</li>
<li>Poner en la botella limpia la chaucha de vainilla.</li>
<li>Agregarle 20% del total de la botella en alcohol.</li>
<li>Agregar 20% del total de la botella en ginebra para potenciar los aromas..</li>
<li>Agregar hasta completar el almíbar preparado.</li>
<li>Dejar enfriar.</li>
<li>Una vez frío, prueben que las porporciones estén bien (la esencia de vainilla es esencial para eso ya que la chaucha es muy lenta liberando sabor y aroma)</li>
<li>Tapar y derretir la vela en la tapa.</li>
<li>Dejar reposar por 1 mes hasta que el color del liquido quede muy similar al wisky.</li>
</ul>
<p style="text-align:center;"><img class="aligncenter" title="Terminado" src="https://lh5.googleusercontent.com/-0cT-WBjhViQ/Ty3TubcGf-I/AAAAAAAAFMo/8qmPnNwRqec/s640/2012-02-04_21-57-48_903.jpg" alt="" width="287" height="384" /></p>
<p style="text-align:center;">Terminado</p>
<p style="text-align:left;"><strong>Nota:</strong> Cuando la bebida se termine <span style="color:#ff0000;">no tiren la chaucha</span>. Córtenla y usen el juguito de adentro para hacer otro licor sin necesidad de comprar una nueva.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/jbcabral.wordpress.com/744/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/jbcabral.wordpress.com/744/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/jbcabral.wordpress.com/744/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/jbcabral.wordpress.com/744/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/jbcabral.wordpress.com/744/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/jbcabral.wordpress.com/744/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/jbcabral.wordpress.com/744/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/jbcabral.wordpress.com/744/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/jbcabral.wordpress.com/744/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/jbcabral.wordpress.com/744/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/jbcabral.wordpress.com/744/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/jbcabral.wordpress.com/744/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/jbcabral.wordpress.com/744/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/jbcabral.wordpress.com/744/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jbcabral.com&amp;blog=2055049&amp;post=744&amp;subd=jbcabral&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://jbcabral.com/2012/02/04/licor-de-vainilla/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/39f5d667c6e5652a646a0e3c4afd0df2?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">JuanBC</media:title>
		</media:content>

		<media:content url="https://lh5.googleusercontent.com/-0cT-WBjhViQ/Ty3TubcGf-I/AAAAAAAAFMo/8qmPnNwRqec/s640/2012-02-04_21-57-48_903.jpg" medium="image">
			<media:title type="html">Terminado</media:title>
		</media:content>
	</item>
		<item>
		<title>Mis promesas para el 2012</title>
		<link>http://jbcabral.com/2012/01/02/mis-promesas-para-el-2012/</link>
		<comments>http://jbcabral.com/2012/01/02/mis-promesas-para-el-2012/#comments</comments>
		<pubDate>Mon, 02 Jan 2012 17:07:30 +0000</pubDate>
		<dc:creator>JuanBC</dc:creator>
				<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://jbcabral.com/?p=741</guid>
		<description><![CDATA[Terminar mi libro. Adelgazar no menos de 5 Kg. Darle una vuelta de rosca a infopython. Terminar yatel. Terminar pychicata.<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jbcabral.com&amp;blog=2055049&amp;post=741&amp;subd=jbcabral&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<ul>
<li> Terminar mi libro. </li>
<li> Adelgazar no menos de 5 Kg. </li>
<li> Darle una vuelta de rosca a infopython. </li>
<li> Terminar yatel. </li>
<li> Terminar pychicata. </li>
</ul>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/jbcabral.wordpress.com/741/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/jbcabral.wordpress.com/741/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/jbcabral.wordpress.com/741/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/jbcabral.wordpress.com/741/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/jbcabral.wordpress.com/741/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/jbcabral.wordpress.com/741/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/jbcabral.wordpress.com/741/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/jbcabral.wordpress.com/741/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/jbcabral.wordpress.com/741/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/jbcabral.wordpress.com/741/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/jbcabral.wordpress.com/741/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/jbcabral.wordpress.com/741/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/jbcabral.wordpress.com/741/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/jbcabral.wordpress.com/741/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jbcabral.com&amp;blog=2055049&amp;post=741&amp;subd=jbcabral&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://jbcabral.com/2012/01/02/mis-promesas-para-el-2012/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/39f5d667c6e5652a646a0e3c4afd0df2?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">JuanBC</media:title>
		</media:content>
	</item>
		<item>
		<title>dPaste.com &#8220;API&#8221;</title>
		<link>http://jbcabral.com/2011/11/14/dpaste-com-api/</link>
		<comments>http://jbcabral.com/2011/11/14/dpaste-com-api/#comments</comments>
		<pubDate>Tue, 15 Nov 2011 01:47:06 +0000</pubDate>
		<dc:creator>JuanBC</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[OpenSource]]></category>
		<category><![CDATA[Programación]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[dpaste]]></category>
		<category><![CDATA[snippet]]></category>

		<guid isPermaLink="false">http://jbcabral.wordpress.com/?p=733</guid>
		<description><![CDATA[&#8220;API&#8221; for http://dpaste.com/<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jbcabral.com&amp;blog=2055049&amp;post=733&amp;subd=jbcabral&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>&#8220;API&#8221; for <a href="http://dpaste.com/">http://dpaste.com/</a></p>
<p><pre class="brush: python;">
#!/usr/bin/env python
# -*- coding: utf-8 -*-

#
# THE WISKEY-WARE LICENSE
# -----------------------
#
# &quot;THE WISKEY-WARE LICENSE&quot;:
# &lt;jbc.develop@gmail.com&gt; wrote this file. As long as you retain this notice you
# can do whatever you want with this stuff. If we meet some day, and you think
# this stuff is worth it, you can buy me a wiskey in return JuanBC
#

# ==============================================================================
# DOC
# ==============================================================================

&quot;&quot;&quot;A Simple Client for http://dpaste.com/

&quot;&quot;&quot;

# ==============================================================================
#
# ==============================================================================

__author__ = &quot;JuanBC&quot;
__mail__ = &quot;jbc.develop@gmail.com&quot;
__version__ = &quot;0.1.1&quot;
__license__ = &quot;WISKEY_WARE&quot;
__date__ = &quot;2011/11/14&quot;


# ==============================================================================
# IMPORTS
# ==============================================================================

import os
import urllib
import urllib2


# ==============================================================================
# CONSTANTS
# ==============================================================================

DPASTE_URL = &quot;http://dpaste.com/&quot;

FORMAT_2_EXT = {
    &quot;Python&quot;: [&quot;py&quot;, &quot;pyw&quot;],
    &quot;PythonConsole&quot;: [],
    &quot;Sql&quot;: [&quot;sql&quot;],
    &quot;DjangoTemplate&quot;: [],
    &quot;JScript&quot;: [&quot;js&quot;],
    &quot;Css&quot;: [&quot;css&quot;],
    &quot;Xml&quot;: [&quot;xml&quot;],
    &quot;Diff&quot;: [&quot;diff&quot;],
    &quot;Ruby&quot;: [&quot;rb&quot;],
    &quot;Rhtml&quot;: [&quot;rhtml&quot;],
    &quot;Haskell&quot;: [&quot;hs&quot;],
    &quot;Apache&quot;: [],
    &quot;Bash&quot;: [&quot;sh&quot;],
    &quot;Plain&quot;: [&quot;txt&quot;]
}

EXT_2_FORMAT = {}
for k, vs in FORMAT_2_EXT.items():
    for v in vs:
        EXT_2_FORMAT[v] = k

# ==============================================================================
# FUNCTIONS
# ==============================================================================

def filename2format(filename):
    &quot;&quot;&quot;Retrieves the format of a given filename

    &quot;&quot;&quot;
    basename = os.path.basename(filename)
    if &quot;.&quot; in basename:
        ext = basename.rsplit(&quot;.&quot;, 1)[1].lower()
        return EXT_2_FORMAT.get(ext, &quot;Plain&quot;)
    return &quot;Plain&quot;


def paste(source, file_format=&quot;Plain&quot;, title=&quot;&quot;, poster=&quot;&quot;):
    &quot;&quot;&quot;Paste a given source code into dpaste.com with a given format

    &quot;&quot;&quot;
    file_format = &quot;&quot; if file_format == &quot;Plain&quot; else file_format
    data = urllib.urlencode({&quot;content&quot;: source,
                             &quot;language&quot;: file_format,
                             &quot;title&quot;: title,
                             &quot;poster&quot;: poster})
    conn = urllib2.urlopen(DPASTE_URL, data)
    return conn.geturl()


def copy(dpaste_id):
    &quot;&quot;&quot;Retrieve a code from a given dpaste id

    &quot;&quot;&quot;
    return urllib2.urlopen(DPASTE_URL + str(dpaste_id) + &quot;/plain&quot;).read()


# ==============================================================================
# MAIN
# ==============================================================================

if __name__ == &quot;__main__&quot;:
    print(__doc__)
</pre></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/jbcabral.wordpress.com/733/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/jbcabral.wordpress.com/733/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/jbcabral.wordpress.com/733/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/jbcabral.wordpress.com/733/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/jbcabral.wordpress.com/733/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/jbcabral.wordpress.com/733/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/jbcabral.wordpress.com/733/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/jbcabral.wordpress.com/733/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/jbcabral.wordpress.com/733/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/jbcabral.wordpress.com/733/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/jbcabral.wordpress.com/733/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/jbcabral.wordpress.com/733/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/jbcabral.wordpress.com/733/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/jbcabral.wordpress.com/733/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jbcabral.com&amp;blog=2055049&amp;post=733&amp;subd=jbcabral&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://jbcabral.com/2011/11/14/dpaste-com-api/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/39f5d667c6e5652a646a0e3c4afd0df2?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">JuanBC</media:title>
		</media:content>
	</item>
		<item>
		<title>Pycante 0.2.1c</title>
		<link>http://jbcabral.com/2011/11/04/pycante-0-2-1c/</link>
		<comments>http://jbcabral.com/2011/11/04/pycante-0-2-1c/#comments</comments>
		<pubDate>Fri, 04 Nov 2011 08:55:55 +0000</pubDate>
		<dc:creator>JuanBC</dc:creator>
				<category><![CDATA[Free Software]]></category>
		<category><![CDATA[General]]></category>
		<category><![CDATA[OpenSource]]></category>
		<category><![CDATA[Programación]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[gui]]></category>
		<category><![CDATA[pycante]]></category>
		<category><![CDATA[pyqt]]></category>

		<guid isPermaLink="false">http://jbcabral.wordpress.com/?p=727</guid>
		<description><![CDATA[Actualicé Pycante el proyecto que ayuda a utilizar de manera cómoda los archivos &#8221;.ui&#8221; de QtDesigner  los cambios principales son: El proyecto ahora es BEER-WARE&#8230; osea es mas libre que antes No esta mas disponible la función &#8221;run&#8221;, ahora hay que crear la aplicación desde Qt. Ahora hay una función &#8221;EDir&#8221; que recibe por parámetro un path de un directorio y retorna una función &#8221;E&#8221; que apunta al mismo (por ejemplo si tenemos [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jbcabral.com&amp;blog=2055049&amp;post=727&amp;subd=jbcabral&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<h2><a href="https://bitbucket.org/leliel12/pycante/"><img class="size-medium wp-image-671 alignright" title="logo" src="http://jbcabral.files.wordpress.com/2011/08/logo.png?w=240&#038;h=186" alt="" width="240" height="186" /></a></h2>
<p>Actualicé Pycante el proyecto que ayuda a utilizar de manera cómoda los archivos<strong> &#8221;.ui&#8221;</strong> de <a href="http://doc.qt.nokia.com/latest/designer-manual.html">QtDesigner</a>  los cambios principales son:</p>
<ul>
<li><span class="Apple-style-span" style="font-size:13px;font-weight:normal;">El proyecto ahora es <a title="BeerWare" href="http://jbcabral.wordpress.com/2011/10/11/beerware/">BEER-WARE</a>&#8230; osea es mas libre que antes</span></li>
<li>No esta mas disponible la función &#8221;run&#8221;, ahora hay que crear la aplicación desde Qt.</li>
<li>Ahora hay una función &#8221;EDir&#8221; que recibe por parámetro un path de un directorio y retorna una función &#8221;E&#8221; que apunta al mismo (por ejemplo si tenemos todos nuestros archivos &#8220;.ui&#8221; en /home/tito).</li>
<li>La operatoria con files y widgets no cambia con los EDir.</li>
</ul>
<p><strong>Ejemplos:</strong></p>
<p><pre class="brush: python;">
import sys

import pycante

from PyQt4 import QtGui

# CONSTANTS
UI = pycante.EDir(&quot;path/to/all/my/ui/files/&quot;)

# using path &quot;path/to/all/my/ui/files/file.ui&quot;
class Window(UI(&quot;file.ui&quot;)):

    def on_buttonBox_accepted(self):
        # buttonBox exist inside file.ui
        ...

app = QtGui.QApplication(sys.argv)
w = Window()
w.show()
sys.exit(app.exec_())
</pre></p>
<p>Para instalar:</p>
<p><pre class="brush: python;">
$ pip install pycante
</pre></p>
<p>o</p>
<p><pre class="brush: python;">
$ easy_install pycante
</pre></p>
<p>o bajarlo de aca: <a href="https://bitbucket.org/leliel12/pycante/">https://bitbucket.org/leliel12/pycante/</a></p>
<h3>Disclaimers:</h3>
<ul>
<li>Lo hice por una necesidad muy puntual</li>
<li>El codigo de &#8220;W3&#8243; no lo probe aunque puede usarse asi pycante</li>
<li>Como notaran en ni un momento llame a SetupUi()&#8230; eso pycante lo hace solo.</li>
</ul>
<pre></pre>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/jbcabral.wordpress.com/727/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/jbcabral.wordpress.com/727/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/jbcabral.wordpress.com/727/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/jbcabral.wordpress.com/727/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/jbcabral.wordpress.com/727/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/jbcabral.wordpress.com/727/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/jbcabral.wordpress.com/727/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/jbcabral.wordpress.com/727/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/jbcabral.wordpress.com/727/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/jbcabral.wordpress.com/727/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/jbcabral.wordpress.com/727/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/jbcabral.wordpress.com/727/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/jbcabral.wordpress.com/727/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/jbcabral.wordpress.com/727/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jbcabral.com&amp;blog=2055049&amp;post=727&amp;subd=jbcabral&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://jbcabral.com/2011/11/04/pycante-0-2-1c/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/39f5d667c6e5652a646a0e3c4afd0df2?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">JuanBC</media:title>
		</media:content>

		<media:content url="http://jbcabral.files.wordpress.com/2011/08/logo.png?w=300" medium="image">
			<media:title type="html">logo</media:title>
		</media:content>
	</item>
		<item>
		<title>Buscaminas Programming Challenges de la UTN-FRC en Python</title>
		<link>http://jbcabral.com/2011/11/03/buscaminas-programming-challenges-de-la-utn-frc-en-python/</link>
		<comments>http://jbcabral.com/2011/11/03/buscaminas-programming-challenges-de-la-utn-frc-en-python/#comments</comments>
		<pubDate>Thu, 03 Nov 2011 13:50:03 +0000</pubDate>
		<dc:creator>JuanBC</dc:creator>
				<category><![CDATA[Eventos]]></category>
		<category><![CDATA[General]]></category>
		<category><![CDATA[OpenSource]]></category>
		<category><![CDATA[Programación]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[challenge]]></category>
		<category><![CDATA[frc]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[utn]]></category>

		<guid isPermaLink="false">http://jbcabral.wordpress.com/?p=721</guid>
		<description><![CDATA[Resolví 2 problemas basados en el buscaminas en Python para la competencia de programación de la UTN-FRC, aca esta el código y mas abajo esta un link al repo de mercurial para quien desee bajar el código mas la entrada. Problema Fácil (Enunciado) Problema Menos Fácil (Enunciado) Los archivos en formato archivo<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jbcabral.com&amp;blog=2055049&amp;post=721&amp;subd=jbcabral&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Resolví 2 problemas basados en el buscaminas en Python para la <a href="http://www.investigacion.frc.utn.edu.ar/mslabs/Pagina%20Nueva/multiflex32/CharlasProgramacion2011.html">competencia de programación de la UTN-FRC</a>, aca esta el código y mas abajo esta un link al repo de mercurial para quien desee bajar el código mas la entrada.</p>
<h2>Problema Fácil (<a href="http://www.programming-challenges.com/pg.php?page=downloadproblem&amp;probid=110102&amp;format=html">Enunciado</a>)</h2>
<p><pre class="brush: python;">
#!/usr/bin/env python
# -*- coding: utf-8 -*-

# &quot;THE BEER-WARE LICENSE&quot; (Revision 42):
# &lt;jbc.develop@gmail.com&gt; wrote this file. As long as you retain this notice you
# can do whatever you want with this stuff. If we meet some day, and you think
# this stuff is worth it, you can buy me a beer in return Juan BC

#===============================================================================
# DOCS
#===============================================================================

&quot;&quot;&quot;Solucion al problema del buscaminas para la competencia de programación de la
UTN-FRC.

Objetivo: Ser legible y servir de instroduccion a python

Problema originalmente propuesto:
    http://www.programming-challenges.com/pg.php?page=downloadproblem&amp;probid=110102&amp;format=html

Nota se simplifico para trabajar solo con matrices cuadradas

&quot;&quot;&quot;

#===============================================================================
# META
#===============================================================================

__author__ = &quot;Juan BC&quot;
__license__ = &quot;BeerWare&quot;
__date__ = &quot;2011/10/26&quot;
__version__ = &quot;0.1&quot;
__email__ = &quot;jbc.develop@gmail.com&quot;
__homepage__ = &quot;http://jbcabral.wordpress.com/&quot;
__twitter__ = &quot;@juanbcabral&quot;

#===============================================================================
# FUNCTIONS
#===============================================================================

def read_n_lines(n):
    &quot;&quot;&quot;Esta funcion lee las siguientes n linea de la entrada y las retorna
    como una lista de listas.

    &quot;&quot;&quot;
    lines = []
    for _ in range(n):
        line = list(raw_input())
        lines.append(line)
    return lines

def increment(board, row, col):
    &quot;&quot;&quot;Funcion de soporte para resolve que incrementa en uno todas los vecinoa
    a una mina

    &quot;&quot;&quot;
    for row_d in (-1, 0, 1):
        for col_d in (-1, 0, 1):
            rowp = row + row_d
            colp = col + col_d
            if rowp &lt; 0 or colp &lt; 0 \
               or rowp &gt;= len(board) or colp &gt;= len(board[rowp]) \
               or board[rowp][colp] == &quot;*&quot;:
                continue
            if board[rowp][colp] == &quot;.&quot;:
               board[rowp][colp] = 0
            board[rowp][colp] += 1

def resolve(board):
    &quot;&quot;&quot;Itera sobre cada celda y si encuentra una mina (*) incrementa todos
    sus cacilleros vacios en 1

    &quot;&quot;&quot;
    for idx_row, row in enumerate(board):
        for idx_col, cell in enumerate(row):
            if cell == &quot;*&quot;:
                increment(board, idx_row, idx_col)

def main():
    field = 0;
    while True:

        # leemos el tamaño de nuestro board
        n = int(raw_input())

        # si el tamaño de nuestro board es 0 salimos
        if n == 0:
            break

        # incrementamos el numero de field
        field += 1

        # leemos el tablero
        board = read_n_lines(n)

        # resolvemos el tablero
        resolve(board)

        # armamos la salida
        out = &quot;\n&quot;.join([&quot;&quot;.join([str(c) for c in row]) for row in board])

        # imprimimos la salida con su decoradores
        # y si queda algun &quot;.&quot; lo reemplazamos por un cero
        print &quot;Field #{0}:&quot;.format(field)
        print out.replace(&quot;.&quot;, &quot;0&quot;)
        print &quot;&quot;

#===============================================================================
# MAIN
#===============================================================================

if __name__ == &quot;__main__&quot;:
    main()
</pre></p>
<h2>Problema Menos Fácil (<a href="http://acm.tju.edu.cn/toj/showp1330.html">Enunciado</a>)</h2>
<p><pre class="brush: python;">
#!/usr/bin/env python
# -*- coding: utf-8 -*-

# &quot;THE BEER-WARE LICENSE&quot; (Revision 42):
# &lt;jbc.develop@gmail.com&gt; wrote this file. As long as you retain this notice you
# can do whatever you want with this stuff. If we meet some day, and you think
# this stuff is worth it, you can buy me a beer in return Juan BC

#===============================================================================
# DOCS
#===============================================================================

&quot;&quot;&quot;Solucion al problema del buscaminas para la competencia de programación de la
UTN-FRC.

Objetivo: Ser legible y servir de instroduccion a python

Problema originalmente propuesto: http://acm.tju.edu.cn/toj/showp1330.html

&quot;&quot;&quot;

#===============================================================================
# META
#===============================================================================

__author__ = &quot;Juan BC&quot;
__license__ = &quot;BeerWare&quot;
__date__ = &quot;2011/10/26&quot;
__version__ = &quot;0.1&quot;
__email__ = &quot;jbc.develop@gmail.com&quot;
__homepage__ = &quot;http://jbcabral.wordpress.com/&quot;
__twitter__ = &quot;@juanbcabral&quot;


#===============================================================================
# FUNCTIONS
#===============================================================================

def read_n_lines(n):
    &quot;&quot;&quot;Esta funcion lee las siguientes n lineas del file pointer

    &quot;&quot;&quot;
    lines = []
    for _ in range(n):
        line = list(raw_input())
        lines.append(line)
    return lines

def touch2coordinates(touch):
    &quot;&quot;&quot;Combierte los &quot;toques&quot; a una lista de coordenadas (fila, columna)
    donde se toco.

    &quot;&quot;&quot;
    coords = []
    for idx_row, row in enumerate(touch):
        for idx_col, cell in enumerate(row):
            if cell == &quot;.&quot;:
                continue
            coords.append((idx_row, idx_col))
    return coords

def coord2mine(row, col, board):
    &quot;&quot;&quot;Retorna un &quot;*&quot; si el lugar donde indica la cordenada tiene una mina
    en caso contrario retorna cuantas minas rodean a ese lugar.

    &quot;&quot;&quot;
    # primero nos fijamos en el lugar
    if board[row][col] == &quot;*&quot;:
        return &quot;*&quot;
    # sino exploramos
    mines = 0
    for row_d in (-1, 0, 1):
        for col_d in (-1, 0, 1):
            rowp = row + row_d
            colp = col + col_d
            if rowp &lt; 0 or colp &lt; 0 \
               or rowp &gt;= len(board) or colp &gt;= len(board[rowp]):
                continue
            if board[rowp][colp] == &quot;*&quot;:
                mines += 1
    return str(mines)

def main():
    &quot;&quot;&quot;Lee desde un archivo un tablero y toques del buscaminas. Por defecto
    usa la salida estandar.

    &quot;&quot;&quot;
    # leemos
    n = int(raw_input())
    board = read_n_lines(n)
    touchs = read_n_lines(n)

    # resolvemos
    for row, col in touch2coordinates(touchs):
        symbol = coord2mine(row, col, board)
        touchs[row][col] = symbol

    # convertimos a string para imprimir por pantalla
    print &quot;\n&quot;.join([&quot;&quot;.join([c for c in row]) for row in touchs])

#===============================================================================
# MAIN
#===============================================================================

if __name__ == &quot;__main__&quot;:
    main()
</pre></p>
<p><a href="https://bitbucket.org/leliel12/talks/src/b6f9706ad036/utnfrc_programmin_challenge_2011">Los archivos en formato archivo</a></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/jbcabral.wordpress.com/721/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/jbcabral.wordpress.com/721/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/jbcabral.wordpress.com/721/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/jbcabral.wordpress.com/721/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/jbcabral.wordpress.com/721/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/jbcabral.wordpress.com/721/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/jbcabral.wordpress.com/721/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/jbcabral.wordpress.com/721/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/jbcabral.wordpress.com/721/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/jbcabral.wordpress.com/721/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/jbcabral.wordpress.com/721/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/jbcabral.wordpress.com/721/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/jbcabral.wordpress.com/721/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/jbcabral.wordpress.com/721/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jbcabral.com&amp;blog=2055049&amp;post=721&amp;subd=jbcabral&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://jbcabral.com/2011/11/03/buscaminas-programming-challenges-de-la-utn-frc-en-python/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/39f5d667c6e5652a646a0e3c4afd0df2?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">JuanBC</media:title>
		</media:content>
	</item>
	</channel>
</rss>
