Pronounceable password phrases generator.

Posted in apps, code, python by pavlo on 7th 2008f September, 2008

I had to practice a bit in python, and this is what came out.

Presenting another pronounceable password phrases generator.

I always wondered how our University generated random phrases as passwords, that looked like real sentences. They are always good readable and pronounceable, but always altered so much, that they were definitely not from a dictionary any more.

This password generator attempts to do the similar task. The passwords are altered prases from random generated lorem ipsum text. I took the lorem ipsum text generator from James Hales (project homepage).

The generator comes in 3 packages – one is command line tool, another is with a GTK+ Gui and the third one is a mod-python version for your apache driven homepage.

Download password generator:


  • Command line version:
    $ python [w] <n>
    where “w” is number of words in each password and “n” is number of passwords to generate.
  • GUI version:
    Is pretty much selfexplaining. Just run

The result look something like this (NOTE – these are satic. Do not use them):

01:  lettis. mi Iatilis
02:  T3mpus, d3n3nypis ulpric3s?
03:  fync1 pony1r1; M1wyn
04:  ma0r0s f0sge wam,
05:  cincin1nc. s1m m1s

I hope this will be useful.

Vim. How to replace a word (string) in several files.

Posted in apps, howto, vim by pavlo on 15th 2008f May, 2008

I Write this post, because I sometimes search for this functionality by myself. Today happened such a case and after I have read again a little bit of online manuals, I decided to post a snippet.

This is taken from the VIM online help (

*12.1*	Replace a word

The substitute command can be used to replace all occurrences of a word with
another word:


The "%" range means to replace in all lines.  The "g" flag at the end causes
all words in a line to be replaced.
   This will not do the right thing if your file also contains "thirtyfour".
It would be replaced with "thirty4".  To avoid this, use the "\<" item to
match the start of a word:


Obviously, this still goes wrong on "fourty".  Use "\>" to match the end of a


If you are programming, you might want to replace "four" in comments, but not
in the code.  Since this is difficult to specify, add the "c" flag to have the
substitute command prompt you for each replacement:



Suppose you want to replace a word in more than one file.  You could edit each
file and type the command manually.  It's a lot faster to use record and
   Let's assume you have a directory with C++ files, all ending in ".cpp".
There is a function called "GetResp" that you want to rename to "GetAnswer".

	vim *.cpp		Start Vim, defining the argument list to
				contain all the C++ files.  You are now in the
				first file.
	qq			Start recording into the q register
				Do the replacements in the first file.
	:wnext			Write this file and move to the next one.
	q			Stop recording.
	@q			Execute the q register.  This will replay the
				substitution and ":wnext".  You can verify
				that this doesn't produce an error message.
	999@q 			Execute the q register on the remaining files. 

At the last file you will get an error message, because ":wnext" cannot move
to the next file.  This stops the execution, and everything is done.

	When playing back a recorded sequence, an error stops the execution.
	Therefore, make sure you don't get an error message when recording.

There is one catch: If one of the .cpp files does not contain the word
"GetResp", you will get an error and replacing will stop.  To avoid this, add
the "e" flag to the substitute command:


The "e" flag tells ":substitute" that not finding a match is not an error.

qubime – windows executable

Posted in apps, qubime by pavlo on 6th 2008f May, 2008

I have built a windows executable for the previously described program – Qubime using simple tool py2exe.

You can download it here [1,8MB].

The executable itself is 23KB, but one needs the libraries for running it at as a standalone application. These are (windows) hidden files and are included whithin the package, so please do not move qubime executables out of the folder. Instead, please make your copies of qubime in the same directory where you have it installed, and place links to the new/old tools you’ve created.

I also included some templates, so you can use them as examples.

qubime – lightweight image editor [UPDATE]

Posted in apps, code, python, qubime by pavlo on 4th 2008f May, 2008

Qubime” – simple to customize editor for multiple images, written in python by me. The name comes from me and it is an acronym for “Quick Bulk Image Editor”.


Short description.
This program is made for quick editing of multiple images. It can resize, rotate, flip and convert them automatically just by dropping your files on the program icon.

A little bit of history.
The Idea of creating such a program appeared, when I wanted to send some pictures attached to an Email. These pictures were too large and I needed to make them smaller, and rotate some of them – an everyday task for many of you out there. I work in Ubuntu, so I have Eye of Gnome for viewing images, F-Spot Photo Manager – for managing photos, and GIMP for editing per default. Eye of Gnome can very simple rotate an image, but, honestly, I haven’t found the function to resize it. F-Spot Photo Manager appears to use Eye of Gnome to view and edit images, so it has the functionality of the latter. The thing I was left with was GIMP. It does its job perfectly, but it’s too heavy for such tasks. Especially, when you have to edit more than one image, you will end up with editing every one separately.

Idea and short usage explanation.
I thougt, that it would be useful to have a program, which can edit (resize, rotate, flip) multiple images at once. I had an Idea of creating an application without GUI. You should just select the images you want to edit, drag them and drop them onto the program. Some time pass (for calculations), and you receive edited images. How to edit the images should depend from the name of the program. So you can create a set of editors for your needs by yourself.
For example, if you want to shrink your images, so that the longer side will be 800px, you will have to have a copy of qubime called If you want to rotate the images clockwise for 90°, then you have to use a copy, which is called or in simplified variation –

After all, you decide, which kind of tools you want to have. The only thing you care about is, that the tools are placed to some visible positions on your desktop (e.g. some links to them on your panel) to have them handy for quick usage.

for Windows, Linux and Mac OSX you can download the program here:
It is a python executable. I have written it in Ubuntu and I only tested it under Ubuntu 8.04 and 7.10. Hope that it will work for Windows and Mac also.

You can also download a standalone version of the program here (for Windows only):

Feedback and bug reporting.
Please read the README file – most of the things are explained there. Nevertheless, I will very appreciate your comments, critiques and bright ideas about how to improve it. If you still think, that you have some unresolved issues or I am not answering for a long time, feel free to write me at

Ah. Nearly forgot it. I do not have any Icons you could use with qubime. If somebody likes to contribute some self-made icons, you are more then welcome. Just write me an e-mail to and attach your icons package. I will publish them here along with the program.
I will be very welcoming every type of contribution, you make – build standalone executables, improve code, fix bugs etc. I will be very glad to publish them along with the program.
All the contributions will be published with the credits to the author of the work.