Category Archives: tools

Memcached and Django

Here a quickie, since I’ve been silent for so long.

I find myself with a REST service taking way too long to process one of its queries, it’s not bad per se, but it will get bad when this query gets hit more often.

Memcached to the rescue.

more

Advertisements

Leave a comment

Filed under code, tools

Tenma DC 72-2540 graphical interface

I was planning to write a post of how to write a simple GTK application indicator. But there’s a really good explanation already from
candidtim that you can follow. It is actually very well explained.

What I’ll do instead is just drop here an update to the Tenma DC 72-2540 command line tool that can be found in the tenma-serial github repo. It is the gtkIndicator.py script, that more or less looks like this:

And note that you can create a small .desktop file, so your desktop environment knows about it 😀

vim ~/.local/share/applications/TenmaDcPower.desktop

[Desktop Entry]
Name=Tenma DC power supply
Comment=
Exec=/usr/bin/tenmaSer/gtkIndicator.py
Icon=/usr/bin/tenmaSer/logo.png
Terminal=false
Type=Application
StartupNotify=true

Some Links

1 Comment

Filed under tools

Tenma72-2540 Linux serial control

I daily work with a DC power supply to run different boards and prototypes. One day, plugging in the power supply I realized there was a USB and a COM port!
It is not correct from a tinkerer’s to avoid this option. So this day ended up with a small Python program (also golang, but that’s a different story) to use this feature.

more

2 Comments

Filed under code, tools

Git config

Lots of us use git in a daily basis, myself included. We can say a lot of git, but I would not say that it is intuitive, or that it has nice shortcuts. Similar to what happens with VIM, over the course of some years and some jobs I collected a small list of git configurations that I find very comfortable to work with.

Damn! I failed again, no posts on summer 😀

List of configs

1 Comment

Filed under curious, tools

Vectorize an image using Inkscape

And now, for something completely different.

For a coming event we want to use logos from different bars and cafes around the block. The idea is to do a little of propaganda: banners, t-shirts, mugs all the way!

Some bars have their fancy logos already as a vector image. Other ones don’t even have a computer where the logo is stored.

In this post we’ll see how to create a vector file from a pixmap (jpg, png, whatever raster format that Inkscape can open). With a couple of examples, a graceful one and a crazy one.

There’s a lot of manuals online for this, an in-depth one with good examples can be found in Tavmjong Bah’s website.

vectorizing!

1 Comment

Filed under DIY, tools

XLS to CSV

A common situation for us (people in the programming/computing/processing world) is that we don’t always work with the same tools as some of our non-tech peers.

Case in point, I received a big bunch of files in XLS/XLSX format, very big files, LibreOffice has trouble working with them. Since I want to perform quick processing on that data, and I already have scripts that process similar data in CSV, the simplest path is to transform those files to plain, ugly, useful CSV files.

Then again, there are 100 files, and I don’t feel like dancing around each one: opening, clicking save as, selecting CSV, telling LibreOffice that this is a semicolon separated CSV file … etc etc.

Entering pandas.

continue please

1 Comment

Filed under code, tips, tools, Uncategorized