arde en el infierno

Junio 16th, 2008

BSO para el día de hoy

Posted by arcturus in Amigos

Podría resumir el día de hoy con dos canciones, curiosamente del mismo grupo, y que no paran de sonar en mi cabeza:

Muse - Butterflies and Hurricanes

y

Muse - Invincible

Abril 22nd, 2008

Limit download (or upload) rate in PyCurl

Posted by arcturus in Tecnología

I'm used to work with curl in other programming languages like php or perl, so pycurl became my first choice in python url access libraries .

Pycurl it's not a native module like urllib2, instead is a wrapper for the C library libcurl, it is not as fancy as native python modules are, but is extremely fast and you have lots of features. Also if you want to find documentation about how to use Pycurl is better to look at libcurl's documentation and examples.

And so I did. In libcurl documentation I found which options i could set for libcurl API to limit download bandwidth usage, MAX_RECV_SPEED_LARGE. Note that options in Pycurl are the same that in libcurl without the prefix CURLOPT.

Here is a simple example of how to limit download a file with a 10KB limit rate:

PYTHON:
  1. import pycurl
  2.  
  3. c = pycurl.Curl()
  4. c.setopt(c.URL, "http://python.org/ftp/python/2.5.2/Python-2.5.2.tgz")
  5. c.setopt(c.MAX_RECV_SPEED_LARGE, 10000)
  6. c.setopt(c.WRITEDATA, file("python-2.5.2.tar.gz","w"))
  7. c.perform()

And this is my story :P

Marzo 22nd, 2008

Reflexiones semanasanteras

Posted by arcturus in Amigos

En Montilla me hallo, en Semana Santa, rodeado de borrachuelos y dulces de la mama (ahiiii mama!). Utilizando mis habilidades con Google Maps para sortear las distintas procesiones caigo en la conclusión que ayer fue Viernes de Soledad y se me ha olvidado felicitar a mi mare por su santo.

Sí, mi madre se llama Sole, y ahí es cuando empiezo a desvariar un poco. La cantidad de nombres en español que son raramente traducibles y generalmente todos ellos relacionados con algún evento sacro.

Como diría Goyo Jiménez: ... no lo cuento, lo hago (mierda, esto en un blog no queda tan bien como en pantalla):

Hola me llamo Soledad ... en inglés nos quedaría algo así ... Hello my name is Solitude (Alone???)

O mejor aún:

Hola soy María Auxiliadora .... Hi, I´m Mary Helper!

Y que me decís de las Lolas :

Soy Dolores y tu? ..... I´m Sorrows and you?

Ea, esa fue mi historia.

Siguiente página »