Tag Archives: python

QDCSS : Quick and Dirty CSS Sprites

qdcss
Ah, spriting.

When I think about sprites, my mind goes directly to the NES, and SNES era.

snests4nintendones

The graphics were meshed together in a way that was easier to handle than multiple images. And well, now they have this nostalgic appeal. I can’t watch this without a smile.

Luigi Sprite from Super Mario Bros.

Luigi Sprite from Super Mario Bros.

As old as 10 years ago (already? :-O) A list apart published an amazing article on how to use this same idea to reduce the amount of browser petitions for images. That article is wonderful, but apart (hehe) from that, it urges people to think creatively!

Long story short, this is going to be a post on how to create a CSS sprite image and stylesheet with 100 lines of python.

CSS sprite generator python

Leave a comment

Filed under code, tools

Python and Jenkins

jenkins_logo

..
NOTE from the future:
Whoops, this was written and forgot in the depths of my drafts. So I just reviewed it and said, hey, It is acceptable to post 😀
..

The third (and probably last) post about this lovely Jenkins guy. It seems that people is right, lately I’m Jenkins man.

Most of what I do in Jenkins can be done with the Groovy Scripting language itself, usually via the Scriptler plugin to keep things organized.

I am a command line guy, and sometimes I just want to get a plain text file with the results for something, instead of firing up Jenkins, going to a build, checking the artifact or output.

In this post I’ll present how to combine a basic Groovy script, with a more in-depth analysis with a python script:

Let’s save some time

4 Comments

Filed under code, tools

Retrieve KML links

kmlhell

On my previous post I worked with a kml that was splitted in various networked kmz files. This was particularly annoying given that I had to track the files in my computer.

I am ashamed, this should have been automatized! And since a friend prepared a nice script for it, here it is.

get my kmls

Leave a comment

Filed under gis, tools

Getting information from IPs

earth

Posts come very slowly, but here’s another one.

This post won’t be useful for most people :-(. You know when you use google analytics and get that fantastic map showing where people connect from? Read this, and you will learn how to do it yourself.

Tell me how

Leave a comment

Filed under code, curious, gis, Maps

Numpy in C

C + numpy

When I was temporary working at my former university UPC (Universitat politècnica de Catalunya) in the TALP department (Center for Language and Speech Technologies and Applications), I found myself in the following situation:
My employers had a lot of python code creating matrices and stuff saved to .npy (numpy files) but wanted to speed up their processes.

I thought about loading those files in existing C code, to effectively use the GPU with OpenGL/CUDA. And once everyone was convinced, I spent some time developing a small library to do so, in the following post you will find an explanation of the numpy format and the code for the C library.

really? continue please

4 Comments

Filed under code, tools

Rpi Weather LED

Raspberry-Pi-logo

In this post I will describe how to use a raspberry pi to give feedback according to specific daily weather. And yes, feedback just means LEDs 🙂

continue

Leave a comment

Filed under code, electronic