The link to the Flash Diagram
Saturday, August 11, 2012
Friday, June 8, 2012
Problema: A qué hora salir de casa para no pillar atasco de camino altrabajo?
Planteamiento
- Tengo la suerte de que la página de la DGT publica las imágenes de trafico de todos las carreteras que uso para llegar al trabajo
- La idea es usar estas las imágenes de las cámaras para evaluar el tráfico
- La primera parte del proyecto consistirá en guardar las imáges de las cámaras de tráfico de las carreteras por las que paso y luego poderlas visionar de manera que pueda ver fácilmente:
- RECOLECTOR DE IMAGENES
- Codificar un script que cada 1min haga una captura de las imagenes de la DGT.
- Como no se la cadencia de publicación de las imagenes hacer un diff de la imagen capturada con la anterior y si es la misma no la guardamos
- Para obtener las imagenes de la DGT voy a usar python, ejemplo
- Para guardar la imagen estoy pensando en usar SQLITE y el campo BLOB. Las imagenes son de 240x176 pixeles = 990KB. Aquí hay una referencia al campo BLOB de SQLITE. Ejemplos con python. Otro ejemplo específico de imagenes
- Implementar un servicio web que devuelva las imágenes por fecha.
- VISUALIZADOR DE IMAGENES
- Puede ser útil …. serializar una imagen con javascript, aquí hay un ejemplo usando dataToURL(). Un mejor ejemplo usando un canvas auxiliar MUY BUENO
- RECOLECTOR DE IMAGENES
Implementacion
hg clone https://albaregar@bitbucket.org/albaregar/trafficjam
Servidor de images con Django
- Crear una aplicacion nueva: python manage.py startapp image_server
- Para probar añadir al fichero view.py añadir el siguiente método
from django.http import HttpResponse
def get_image_test(request):
filename = 'trafico.jpg'
image_file = open('/home/boundingbox/webapps/rpc/myproject/image_server/%s'%filename,'rb')
file_content = image_file.read()
response = HttpResponse(file_content, mimetype='image/jpeg')
response['Content-Disposition'] = 'inline; filename=%s'%filename
return response
- Para probar añadir al fichero url.py la siguiente línea
(r'^imageTest/$', 'myproject.image_server.views.get_image_test')
- Para acceder a la imagen:
A) http://rpc.boundingbox.es/imageTest/
B)<html><head<title>Test image server</title></head><body><img src="http://rpc.boundingbox.es/imageTest/"></body></html>
- Probar una función que devuelva una imagen dado el año, mes, dia. Añadir la siguiente linea a url.py
(r'^imageGet/(?P<year>\d\d)/(?P<month>\d\d)/(?P<day>\d\d)/$','myproject.image_server.views.get_image')
- Añadir la siguiente función a views.py
def get_image(request, year, month, day): html = """ <html> <body>Anio:%s Mes:%s Dia:%s</body> </html>"""%(year, month, day)
return HttpResponse(html)
- Para comprobar que funciona
http://rpc.boundingbox.es/imageGet/10/09/20/
Cómo encontrar las cámaras
- Usar la página de la DGT para saber en qué carreteras hay cámaras y cúantas hay. El problema es que en esta página las cámaras se identifican por carretera y punto kilométrico lo cual hace un poco difícil situarlas en un mapa
- Usar la página de la guía repsol, la búsqueda por punto kilométrico y activando la capa de cámaras para poder localizar mejor la situación de las cámaras y ver si la cámara nos sirve. Usar el buscador de carreteras
- Usar google maps para sacar la posición GPS
Cómo servir ficheros css y javascript desde dentro de una aplicación de Django
Si la eficiencia no es una prioridad existe un modo sencillo que me viene de perlas. Todo viene explicado en este link.Wednesday, December 2, 2009
Tuesday, November 10, 2009
About Planet51 BoxOffice Tracking
About the Idea
The release of the Planet 51 is almost here, Nov 20th 2009. I'm interested in the box office of this movie so I decided to create some charts to to see the evolution of the box office in a visual way.
To track Planet 51 US Box Office I've gathered some information from boxofficemojo and I've done some charts to compare Planet 51 against other animation movies. For this purpose I've chosen 3 groups:
Sony Top 5: The top 5 animation movies with the best US box office distributed by Sony
1. Cloudy with a chance of meatballs
2. Open Season
3. Monster House
4. Surf's Up
5. Final Fantasy
Top 5: The top 5 animation movies with the best US box office
2. Open Season
3. Monster House
4. Surf's Up
5. Final Fantasy
Top 5: The top 5 animation movies with the best US box office
1. Shrek 2
2. Finding Nemo
3. Shrek The Third
4. Up
5. Shrek
Top 5 Nov: The top 5 animation movies released in November
2. Finding Nemo
3. Shrek The Third
4. Up
5. Shrek
Top 5 Nov: The top 5 animation movies released in November
1. The Incredibles
2. Monsters Inc
3. Toy Story 2
4. Happy Feet
5. Polar Express
2. Monsters Inc
3. Toy Story 2
4. Happy Feet
5. Polar Express
About the charts
1. Weekend Box Office: This chart let you compare weekend box office of Top 5 and Top 5 Nov movies against Planet 51.
2. Daily Box Office Normalized to Planet 51 Release Date. This chart let you compare daily box office of Top 5 and Top 5 Nov movies against Planet 51.
3. Daily Box Office Normalized to Planet 51 Release Year. This chart let you compare daily box office and release dates of Top 5 and Top 5 Nov movies against Planet 51.
2. Daily Box Office Normalized to Planet 51 Release Date. This chart let you compare daily box office of Top 5 and Top 5 Nov movies against Planet 51.
3. Daily Box Office Normalized to Planet 51 Release Year. This chart let you compare daily box office and release dates of Top 5 and Top 5 Nov movies against Planet 51.
Everyone is invited
Feel free to collaborate, make suggestions, add comments, whatever and whenever.
Saturday, June 27, 2009
From C++ to ObjC/Cocoa. Destination iPhone
I'm thinking about developing some applications for iPhone. I've never code anything for Mac, so starting this trip to IPhone, the first stop is ObjC/Cocoa. Here I have collected some information I found useful for C++ programmer to start coding ObjC .
Sunday, January 18, 2009
More on flash charts to see temperatures
You never know from where the inspiration will arrive. Doing some banking managements I took a look at one interesting Euribor Web Page and I came across a nice charts with lots of options to be able to explore values along a wide time range. Doing some research I found that the flash chart used belongs to amCharts. This web offers the use of a wide range of flash charts for free, including the stocks chart, the one that I was interested in.
Thursday, January 8, 2009
Conferencia de Ed Catmull. How Pixar Fosters Collective Creativity
- Ed Catmull es el CTO de una empresa de renombre dentro del la producción de películas de animación y resulta que es un sector del que no abunda información de gestión de equipos.
- En esta conferencia la mayoría de los consejos y recetas van acompañadas de una breve descripción sencilla de como ha llegado a esas conclusiones. Como en cualquier problema es muy importante definir las condiciones de contorno para poder aplicar la solución más adecuada. Muchas conferencias no describen el contexto que llevó a las conclusiones que se exponen, obviando gran parte del problema.
- La conclusiones que aporta Ed Catmull sobre los cimientos de Pixar a la hora de gestionar sus equipos, bajo una apariencia de convencionalidad, no lo son. De hecho, creo que aporta ideas muy modernas de gestión, pero sin negar que implica asumir ciertos riesgos para que realmente fragüen. Vamos, que nadie da duros a peseta. Quien no arriesga no gana.
Antes de seguir recomiendo la lectura Conferencia, pero si no tienes mucho tiempo aquí va mi resumen.
Friday, January 2, 2009
Debian Server Backup Script using Gmail
The third level in backup security and one of the most important is to be able to store backups in a place different than the production place, well known as Keep backups off-site. Currently taking advantage of free services like gmail, it´s much easier to fulfill this third level of backup security and to have all your backups available through an internet connection. Here I show a homemade script that does the following steps.
- Compress your web server, database and svn repository
- Encrypt compressed files with openssl
- Send those files to a gmail account
- Clean gmail account removing old backups
Thursday, January 1, 2009
PythonWin 2.4.3 Create wrap classes for COM automation
This is just a little tip for those who use python and work with COM automation components. If you are a windows user, and you want to write python scripts to interact with Adobe Photoshop, Microsoft Excel, Microsoft Visual Studio the best way to do so is using the this application's COM componts. But most of the times finding documentation this COM components registered in your Windows is tricky and difficult. Using a simple tool that is automatically installed with the pythonwin module, you can get wrap python classes for all interfaces and constants exported by a registered COM component. This usually helps a lot to find non documented methods, and even to make your python script more legible and clean.
Sunday, August 17, 2008
Inkscape. Vectorize for free and without too much pain
A great friend and coworker drew my south park caricature. It was a hand drawing so I scanned and get a dirty grey-scale image, not to nice. So to get something cleaner I realized that I will need to vectorize the image. To do so I was looking for some freeware and I found Inkscape. This open-source software is surprisingly great and the vectorizing tool is awesome for someone like me that was facing this problem for the first time. So in the following lines, I will briefly document how to vectorize a bitmap using Inkscape and the help of The Gimp.
Friday, July 25, 2008
Modelling (II). Playing with subdivision surfaces.
The main idea behind modelling using subdivision surfaces is to create simple geometry that after applying a smoothing algorithm like Catmull-Clark or Loop it finally gets its smoothed and final shape. This way you model the low resolution mesh and you get the higher resolution meshes applying different levels of this smoothing modifiers.
The main problem is that this smoothing algorithms will smooth at all cost and you sometime want to keep several edges chamfered but hard. One way to do this is creating bound edges around the edges you want to be hard.
Friday, July 18, 2008
3dsmax Modelling (I). Using Image references
One interesting technique to model real things, is to use pictures of this real things as a reference and place them in our modelling software so we can do the blocking of the model based on that visual information. Here I will describe step by step how to do it using 3dsmax. Thanks to Ramón for all the help.
Friday, July 11, 2008
Mundos Digitales 2008 (I). Beowulf y la pirámide del valor.
Tuve la suerte de poder asistir a la edición de este año de MundosDigitales, festival de la industria del 3D que se celebra anualmente en La Coruña y que reune a personas de la mayoría de los estudios de animación nacionales y parte de Europa. Es un encuentro muy agradable donde asistir a conferencias sobre este mundillo y hacer amigos del sector.
Para no olvidarme de las conferencias que considero que más me han gustado, voy a llevar a cabo unos cuantos post en que describiré varias ponencias de Mundos Digitales 08 de forma desenfadada y con bastantes aportaciones personales (quién avisa no es traidor),
[Post in spanish because I feel more comfortable using my native language and I don´t have too much time to translate this in english. Content just for spaniards sorry.]
EL CAMBIANTE MUNDO DEL PIPELINE EN EL CINE
Sebastian "Beowulf carnosico" Sylwan
Wednesday, July 9, 2008
MrPotato Indiana Jones
Incredible, people from Playskool knows what I need, they have already released the new MrPotato Indiana Jones, with integrated sound in the hat. So I can get rid of the useless Indiana Jones soundtrack emitter and replace it with my voice synthetizer :D. Now I only need some spare time.
I agree it´s not very friendly, it´s a kind of ugly, but it´s a MrPotato c´mon and if you press on the hat you will get some music, isn´t it cute?. During this summer holidays I need to be working on that defenitely. MrPotato v.3 is about to come. Muhahahaha
Saturday, June 7, 2008
Arduino Contest 2008
The company that is currently distributing Arduino in Spain, Libelium, organized 2 months ago an Arduino Contest. And I force myself to compete with something. I decided to improve my first MrPotato Robot adding voice, led eyes a thermometer, and of course using the new MrPotato Maximus Prime. It took a great effort, I finished the hardware stage, but I couldn't end the software one. Anyway, I sent it to the contest, competing in the Art Hack section.
4 Windows must-have Tools
Developing SysAdmin task on Windows Operating System seems to be a kind of hard, not anymore if you are properly equiped. Here I recommend a set of cool tools to make your Windows usage&control experience easy peasy.
CmdHere. Console directory navigaton... Forget it
Some coworker told me that there was a way to navigate your filesystem using the windows explorer and opening a windows console from there. And today I found some time to search the solucion. CmdHere.
If you are using Windows Vista, the CmdHere is a builting feature. The only thing you need to do from your windows explorer is to Shift+Right Click at the directory and choose from the context menu option open command prompt here. For more details, MaximumPcguides
Thursday, May 22, 2008
Groupie, groupie!!
Let's give this blog a little bit of color. Here I want to share with you my Conchita's Signed CD. A friend of mine, (Mrs. Andrew), has contacts in the VIP world, and gathered this for me. I'm pretty excited, I'm not sure how much time it will last. Anyway here I add a brush of eccentricity to this blog.
Saturday, March 22, 2008
FusionCharts. Cool flash charts with a free distribution
[kml_flashembed movie="http://www.boundingbox.es/wp-content/uploads/2008/03/fcf_mscolumn2dlinedy.swf" height="300" width="600" fvars=" dataURL= http://www.boundingbox.es/wp-content/uploads/2008/03/temperature_080321.xml ; chartWidth = 600 ; chartHeight = 300"/]
fcf_mscolumn2dlinedy.swf
temperature_080321.xml
I have to admit that I wasn´t very proud of my matplotlib code to represent the temperature values I was gathering with Arduino. It was pretty complex, and too slow. Meanwhile I´ve been facing several issues that requires data representation and searching for alternatives I came across a nice solution, flash charts. I found two projects, one open source, Open Flash Charts, and another commercial, but with a free distribution, FusionCharts
Saturday, March 8, 2008
libgmail. Python binding for Google's Gmail service
I´ve spent some time thinking how to backup the data I´m currently storing in my linux server. First of all, I faced the problem of coding the script to backup and then configuring the cron services to execute it daily. When all was working I had to decide where to put those backup files, because leaving them in the server hard disk wasn´t a solution. So I bought an USB hard disk and from time to time I move the backup files there. I was more or less happy with the solution. But some months ago I talk to a friend and co-worker who was starting to use a gmail account as a backup storage. I thought that was a great idea so I started to find a python library that helps me to send all my backups to my auxiliary gmail account, and I found it, libgmail .
Subscribe to:
Posts (Atom)














