terça-feira, 15 de novembro de 2011

Teste em 2011

Estou a escrever a partir do meu telemóvel. Claramente estamos em 2011. :-)
No ano que se passou desde a última mensagem não se passou nada se não contarmos vários acontecimentos como o nascimento da Sara.

sexta-feira, 28 de janeiro de 2011

Interessante: Vivian Maier - Her Discovered Work

Enquanto lia o Internet Scout Report encontrei uma referência à obra de uma fotografa de rua quase desconhecida cujo trabalho só parece estar a ser verdadeiramente apreciado depois da sua morte em 2009.

O trabalho pode ser apreciado blog criado para o efeito pelo caramelo que comprou o espólio num leilão em Chicago onde ela morou a maior parte da sua vida.

São fotografias muito interessantes e que de alguma forma me fazem lembrar a poesia do Fernando Namora.

terça-feira, 26 de outubro de 2010

Python class for quaternions


Last August in Dublin (at DCU) I presented a tutorial about Python in Scientific Computing.

While there I thought it was appropriate to give a native example (in Rome be Roman) and so I choose the Quaternions. This is a good excuse as any other to present the multiple features of python for science. :-)

The picture above is carved in the Broom Bridge, over the Royal Canal, and where supposedly Hamilton had the inspiration to come with such beasts :-) . I had described before (in Portuguese) my hazard quest to find the place. An yearly event, at 16th of October, gets people together to visit the place and probably for a couple of drinks. :-)

While preparing the course I searched for python implementations of the quaternions and I have only found code related with graphics transforms (where the quaternions can be useful).
In the same spirit of Free/Open Source Software, to scratch a itch, I make available my implementation of  a python class that implements the quaternions and that deals transparently with the complex numbers.

The code can be found at my homepage.

Here it is a sample:

    a = Quaternion(1, -2)
    b = Quaternion(1, 2, -3, 4)
    c = 1 - 2j

    print "a =", a
    print "b =", b
    print "c =", c

    print a + b
    print a - c

    print a*b
    print a*c

    print 2*a

    print b*b.conjugate()
    print abs(b)**2

And the resulting output:

a = +1-2*i+0*j+0*k
b = +1+2*i-3*j+4*k
c = (1-2j)
+2+0*i-3*j+4*k
+0+0*i+0*j+0*k
+5+0*i+5*j+10*k
-3-4*i+0*j+0*k
+2-4*i+0*j+0*k
+30+0*i+0*j+0*k
30.0

I hope this helps others who have the same problem I had. :-)

segunda-feira, 25 de outubro de 2010

Fedora: an auspicious name

I have stated several times before that Fedora is strange name in Portuguese. Imagine my surprise when walking in Lisbon at "Rua Aurea" I got the following view. "Bijuterias" the name after Fedora means costume jewelry.

For what is worth this post has been delayed one year since the last time I was there I only had my mobile phone camera (not terribly accurate). Now with a real camera the result is worth to show.

Equally interesting is that "Rua Áurea" can be translated as "Golden Street". The street that follows it is "Rua do Ouro", Gold Street.
The streets at that area of Lisbon were rebuilt after the 1755 major earthquake, and the resulting tsunami that followed it, that totally destroyed that area. The streets at that area were named after the particular trade practiced there (a common practice in medieval Europe).

A posteriori (as opposed to "a priori") the relevance of this poster can be attributed to the next release of Fedora. Fedora 14 release will happen (we hope) next Tuesday, 2nd of November the day next  to the anniversary of Lisbon earthquake. Let us hope for this to be a (benign) earthquake in OS landscape.

sábado, 25 de setembro de 2010

Determinação da variação global do nível do mar

Não, não é um meu trabalho mas antes a apresentação da Xana.

Aqui está a apresentação em vídeo.

sábado, 4 de setembro de 2010

Samsung Galaxy: Adding a proxy

I have a (new) smart phone, the Samsung Galaxy S that has a really nice 4 inches (10.16 cm) AMOLED screen among other niceties. :-)

It come with the 2.1 Éclair Android systems. In the last couple of weeks I have been in DCU (Dublin City University) that has (a weird security setup and) a network that requires an explicit proxy. In order to use the Wifi there I had to set up the said proxy.

The problem as I found out later is that the standard Android versions does not come with a way to configure a proxy. Taking a look to Xana's HTC Wildfire I see that HTC Sense does not have that option either.

That issue is reported in Android bugs list, with lots of ired and angry users letting their opinions being known about the fact (some of the posters are really harsh about the missing feature).

The purpose of this post is to report that it is possible to add a http proxy for Galaxy. It is not obvious at first (or second, third and so on) sight. We need to go to Wifi Network Settings and while there press the context menu (the list button), there are two possible options, Scan and Advanced. The proxy can be set in Advanced, the Advanced mode is also available in the standard Android set but the proxy option is not there.

Unfortunately the proxy does not work with the Android Market application, or with maps, or... so it is not a huge advantage. :-(

Lets hope that this is solved for future versions.

quinta-feira, 2 de setembro de 2010

Vila Moleza

Para quem não sabe o que é a Lazy town, em português Vila Moleza, a wikipedia dá uma boa ajuda.

Eu sei que o Xico (o mais novo dos sobrinhos) gosta, como aliás todos os outros. O programa é mexido, tem ritmo e a mim, para além destes atributos, também interesse pela combinação de efeitos especiais, bonecos e encenação que usa.

Esta semana tenho tomado o pequeno almoço com os primeiros episódios da série (que não tinha visto em Portugal) e aparentemente ao almoço fui influenciado pela série. Em vez de comer o peixe (bacalhau no caso) com umas batatas fritas (o tradicional fish and ships) comi com salada e e vegetais.

Decididamente também me deixo influenciar pelas séries de televisão tal como os miúdos. :-)