ipython notebooks: En la nube o en windows
En la nube
La empresa wakari ofrece notebooks ipython con todas las funcionalidades online!!Por el momento es gratuito y permite guardar los cuadernos en la nube. La dirección es:
https://www.wakari.io
Para empezar
Una buena introducción a los módulos para ciencia y tecnología.En windows
Si queremos usar los notebooks en windows la mejor opción es instalar el entorno (gratuito) de Canopy. Una vez instalado abrimos la "Canopy command prompt" que está configurada con el entorno completo para correr iphyton y abrimos una sesión con, por ejemplo,ipython notebook --pylab inline
Si queremos editar en Latex directamente con la etiqueta %%latex tened en cuenta esto.ipython: Shell python científica. Instalación.
Para los que estamos usando python en el día a día, es normal que si tenemos que hacer matemáticas, preparar gráficos vectoriales de calidad, documentar un proyecto o simplemente investigar una idea contemos también con nuestro lenguaje preferido en vez de irnos a un Mathematica, Matlab o similar.
Ojo, no estoy diciendo que uno sea mejor o peor que otro. Simplemente digo que si como yo usas python habitualmente, y no usas Mathematica cada día, tal vez te sea más cómodo usar ipython en tus proyectos científicos.
Una ventaja evidente es que tenemos a nuestra disposición la enorme y probada en situación real biblioteca de python para hacer cualquier cosa imaginable que pueda hacer una computadora. La desventaja es que tal vez tengas colegas que (aún) no saben python y no te venga bien si tienes que trabajar en grupo.
Básicamente ipython es una shell de python mejorada con código resaltado y gráficos.
Instalación
Web del proyecto:http://ipython.org/index.html
Si queremos usar la consola gráfica necesitamos las Qt. Para instalar pyqt (escojer la combinación adecuada de versión de python y sistema operativo):
http://www.riverbankcomputing.co.uk/software/pyqt/download
Nota: Para saber qué versión de python tienes instalada haz
python --version
en la linea de comandosInstalar librerías matemáticas y de plotting
Scipy (recomiendo anaconda): http://www.scipy.org/install.htmlMatplotlib: http://matplotlib.org/downloads.html
... Si faltan librería recordar que easy_install nombre-de-libreria es nuestro mejor aliado.
Para comprobar si matplotlib está bien instalado
python -c "import matplotlib"
no debe dar erroresCompartir notebooks
http://nbviewer.ipython.org/Shortcuts
Breaking Bad: Pequeño homenaje
Fantastico ensayo en wired acerca de BB y la masculinidad.
"If you're committed enough, you can make any story work. I once told a woman I was Kevin Costner, and it worked because I believed it"
Skyler:
"All I can do is wait . . . for the cancer to come back
Mike Ehrmantraut:
"Just because you shot Jesse James doesn't mean you are Jesse James."
Marie Schrader:
"They’re rocks"
Walter White, Jr.:
"He's a great father, a great teacher. He knows like everything there is to know about chemistry. He's patient with you, he's always there for you. He's just decent. And he always does the right thing and that's how he teaches me to be."
Gustavo Fring:
"I hide in plain sight, same as you"
Jesse Pinckman
"Yeah, bitch! Magnets!"
Hank Schrader:
"Heisenberg? Heisenberg! You two-faced sack of s--t! I will put you under the jail"
Vince Gilligan (Breaking Bad creator):
"You take Mr. Chips and turn him into Scarface."
Walter White:
"I am not in danger, Skyler. I am the danger! A guy opens his door and gets shot and you think that of me? No. I am the one who knocks!"
Source: The Telegraph
Picture: AMC
Django desde un template llamar a un procedimiento del primer objeto de un query
Puede usarse el with con esta sintaxis:
<img {% with im.inmuebleimagen_set.all|first as imagen %}
src="{{imagen.get_url}}"{%endwith%}
/>