Author: mattions

The anonimous Bank Holiday ovvero come ti faccio festa in England

Questa mattina, dopo giorni di splendido relax at home con 30 gradi mare e giri vari, sono pronto al ritorno al lavoro.
Già ieri all’uscita dell’aereo, ho capito che ero tornato in England. 17 gradi scarsi, un ottimo venticello freddo tagliente, cielo nuvoloso.

Lovely england.

Anyway, stamattina mi sveglio e vado verso la fermata dello shuttle-bus che mi porta a lavoro.

Quando esco da casa vedo la strada stranamente non trafficata e la cosa mi insospettisce ma non troppo poichè il cielo era rassicuratamente grigio.
Arrivo all’incrocio con East Road ed anche questa era decisamente vuota. Pochissime macchine, nessuno in giro…

Vuoi vedere che oggi è una bank holiday… Giro l’angolo ed arrivo alla fermata, notando che non c’è nessuno in fila… Mhh… L’ho perso od è bank holiday?

Passano due tipi, faccio la fatidica domanda…..
“Excuse me, is a bank holiday today?”
“Yes”.

…. (Qui ho pensato che seriamente potevo mollare la sveglia al suo oblio e dormire un pochino di più, potevo prolungare di un giorno la vacanza in Italy…. ed invece..)

Oggi è la Summer Bank Holiday. Non ci sono altre info. Nemmeno qui
Inglesi, con le loro feste messe quando meno te le aspetti.

Interested in some random math stuff?

How an Hill equation looks like?
What is the behaviour of an alpha function?

well, I have scipy installed, I know the equation, I know how to create an array of points… Let’s crunch some numbers!

Hill’s equation:
hill1

n variation
hill2

K variation:
hill3

Alpha function:
alpha_function

If you interested in this and other amenities check the code in the scipy_ex folder on github.

The Hill equation is in the mathematical functions script..

Bibtex, some tips

I’m writing a report and I had to cite an article from a book. It’s one of this book which every article can also be used as a standalone paper. The problem is that if you use an article record, you will miss the book and if you use the book record, you will miss the article.

How to solve it? Google it! (somebody has already solved it and post it somewhere)

And it is. The solution is to use @incollection:

@InCollection{Doe05,
author = {John Doe},
title = {Dynamic Ambient Paradigms},
booktitle = {Paradigm Gems 2},
pages = {223--233},
publisher = {Addison Wesley},
year = 2005,
editor = {Averell Doe}
}

More BiBTeX tips (where I found this solution) on this page.

LaTeX and getting the figure in the right place

If you use LaTeX and sometimes want to override the TeX macro to get your figure right there you can do it.

You can use the exclamation point !


\begin{figure}[!ht] \begin{center} \includegraphics[scale=0.50]{image.png} \end{center} \end{figure}

However the results is not really nice as when Tex take care to do the layout. So the win-win solution would be to have Tex taking care of the layout, but force it to put all the figure that belong to a section within that section.

Well that’s pretty easy and the command

\clearpage{}

Just does the trick.

If instead you refer to a figure but instead of the number of the figure you can read the number of the section, this is because you have misplaced the caption with the label.

The label has to go after the caption, otherwise it will refer to the section not to the figure.

Right way:

\begin{figure}[htb]
\begin{center}
\includegraphics[scale=0.50]{image.png}
\caption{A wonderful image!}
\label{fig: image}
\end{center}
\end{figure}

Note the relax [htb]. LaTeX will take care of the position for you.

Like a fish in a barrel

An amazing interesting post about crisis and society collapse from Ugo Bardi on the oildrum.

According to the author the complexity of a society is both a cost and a benefit, but after a certain point is only a cost which will bring the society down.
The “homeostasis” is the process which the complex society use to compensate forces which destabilize the society. This analysis is applied to the Roman Empire, but analogy with our societies are also drawn.

The crisis is very close and we are swimming in it, but we are not able to see the water.

A small discovery

I just discovered that in using pylab you can plot an array or list of number vs the list lenght by default.

Let’s say we have a list of point like [2,2,3,4,5,5,6,10, 23,45,58,42,12]
points = [2,2,3,4,5,5,6,10,23,45,58,42,12]
well to plot this you just have to
pylab.plot(points)

and this is the results:

pylab example

pylab example

The whole script in python
import pylab
points = [2,2,3,4,5,5,6,10,23,45,58,42,12]
pylab.plot(points)
pylab.show()

The last one is needed to show the window, which will happen automatically if you are running the script using ipython with the pylab option.

I just discovered by chance. I always thought that to plot you need x and y, but of course it’s possible to infer the x if you just one to plot only the points, cause each point in the list has a “Cartesian coordinates” embedded, i.e. [0,2];[1,2];[2,3];[3,4];… etc.

For the lazy: presentazione della mozione di Ignazio Marino

Marino ha presentato la mozione con la quale si presenterà al congresso il 25 ottobre:

è bellissima.

Punti salienti (ovviamente solo un paio):

  • cultura del merito:

il merito ed il principio di responsabilità come leva per risollevare la società. Merito utilizzato come unico criterio per scegliere chiunque in qualunque settore.

  • sicurezza come integrazione e macchina della giustizia efficiente:

No alle ronde, ma rafforzamento delle figure istituzionali (polizia, carabinieri). Efficienza della macchina della giustizia e rispetto delle regole per tutti.

  • Energia: secco no al nucleare, puntare sulle energie alternative:

Solare a concentrazione solare (CSP), Eolico di alta quota (KiteGen system), Geotermia di terza generazione. Chi frequenta questo blog sà già di cosa si parla. Chi non lo frequenta segua i link che lo portano su wikipedia. Riferimento anche al progetto DESERTEC con una chiara strigliata al non decisionismo europeo, il quale pagheremo in futuro. Il tempo di agire è ora, il levello è europeo. (Io personalmente lo sostengo da un pò.)

  • Scuola come fulcro e decisivo momento di avanzamento culturale:

La scuola come momento formativo necessario e determinante della società italiana.

Questi sono solo alcuni, fantastici i passaggi sul sistema sanitario nazionale, il congendo per maternità esteso alla coppia e non solo alla madre e cose del genere. Confermo che vale la pena vedere tutto l’intervento.

Qui sotto i 5 pezzi.

Prima Parte:

[youtube http://www.youtube.com/watch?v=EpMXUQMp1-Y&feature=related]

Seconda Parte:

[youtube http://www.youtube.com/watch?v=RU6Zfgh2rO0&feature=related]
Terza Parte:
[youtube http://www.youtube.com/watch?v=Vbyop_oOXXg&feature=related]
Quarta Parte:
[youtube http://www.youtube.com/watch?v=XrL8gYSpvX0&feature=related]
Quinta Parte:
[youtube http://www.youtube.com/watch?v=meOylip9by0&feature=related]