Umang's Blog

Test a website on multiple browsers without installing!

April 14th, 2009 by Umang

Tags: , ,
Posted in Uncategorized | No Comments »

I just found this today. I was hoping something like this existed, but now I know it does. Browsershots is a little slow if you don’t want to pay (your site is queued for 30mins, etc) you still get screen shots of your site from various browsers and operating systems!

I’ll try this the next time I want to check my website on many browsers!

Umang

Ex Falso

October 9th, 2008 by Umang

Tags: , , , , ,
Posted in Linux, Python, Ubuntu | No Comments »

If you, like me, tried EasyTag, cowbell and tagtool to find that all of them are slow, they crash and are by no stretch of imagination easy-to-use. I spent an hour trying to search for a good one yesterday. I used to use EasyTAG, but it used to crash when I’d try to rename many files at once. Also, I never knew what I was doing. It didn’t have a good preview feature.

Ex Falso , on the other hand, is much better. It’s fast, and doesn’t crash (its consistency coming from Python, maybe). It’s got a great UI! Very easy to use, shows you exactly what it’s doing. Very intuitive tagging of multiple files. Awesome renaming (with a great preview). Quodlibet is a program made in the same project that has a player also. I haven’t tried it as yet, though I expect it to be good.

Give this Audio tag editor a try and I’m sure you’ll love it!

GNOME Do!

October 9th, 2008 by Umang

Tags:
Posted in Linux, Ubuntu, Uncategorized | No Comments »

I’ve been using Do for a few months and I just felt like saying, “It is awesome!”. It does everything from initiating a chat in Pidgin to allowing you to compose a mail to a buddy to searching and downloading torrent files! It even has Google Calculator, the list doesn’t end….

Try it!

gParted works!

July 31st, 2008 by Umang

Tags: , , , ,
Posted in Linux | No Comments »

I tried gParted again, this time making sure the iso was downloaded properly (I presume that was the original problem). It worked! I moved some partitions and resized two (including my root partition for Ubuntu) and it worked perfectly, almost.

The NTFS partition was alright. Windows booted, performed a check disk scan, and continued, perfect. Ubuntu booted, the uSplash bar bounced and then I got a text screen instead of the uSplash bar scrolling. Finally found out that uSplash wasn’t able to swapon my swap partition. So I have to make some configurations that I found in Ubuntu forums and it was also perfect. Restarted and uSplash was fine, swap came on at boot and Ubuntu was back to flying as fast as it did (without the swap, Ubuntu was crawling like my XP).

But that wasn’t gParted’s fault. gParted is really nice and I’m glad I’ve found out. I’m going to resize my partitions whenever I want without having to go through that horrible copying, deleting making a new partition nonsense. Before trying it, check the MD5 if you haven’t already. Not doing that made my think it doesn’t work the first time around.

Umang

[SCRIPT]Markov text generator

May 28th, 2008 by Umang

Tags: , ,
Posted in Python, Scripts | No Comments »

This has got to be the funniest script I’ve written! It takes in text and returns similar text that doesn’t make sense. Here’s how it works: It takes a level and then reads the text. It looks for n number of words ( n being the level). For each set of n words, it records the following word. When it rebuilds the the text, it finds the first n words, then look for the possible words that can follow it. Randomly chooses one. Now it has n + 1 words. It takes the last n words and then look for possible words that can follow and adds another. On its way, it removes the possibilities so that it ends up running out of possibilities.

Usage:
-l[arg], –level[arg]          : The order of the lists. The higher the number, the more like english it is. 1 is nonsense, 2 is usually funny, 3 and above sound too real. 10 and above are most probably exactly the same.
-i[arg], –input[arg]          : The input to get the content from (URL, localfile, raw text).
-h, –help                     : Displays this help screen
-o[arg], –output[arg]         : The file to output the markov text to.

I got the feeling that there was a better way of doing this while I was coding it. I might re-look at this, but if you find that there is a better way (or you have anything to say), please do comment .

[SCRIPT] Book/text statistics

May 27th, 2008 by Umang

Tags: , , ,
Posted in Python, Scripts | No Comments »

Just to learn, I made a small script in Python that will find out what are the most used words in a book or piece of text. It has special support for most gutenberg files, it can read the title of the book and exclude the licence (above and bellow the book content) from the counting. The usage is simple:

Usage:
-i[arg], –input[arg]          : The input to get the content from (URL, localfile, raw text). Special support for Gutenberg books (with the licence removed, and module can be extended to read book title.)
-h, –help                     : Displays this help screen
-o[arg], –output[arg]         : The file to output the csv file to. Note: This should end with .csv.
-c, –common                   : This removes the common words in the final statistics. Support for customization of the common word list later.

This uses Mark Pilgrim’s openAnything module (since I know how it works, I don’t think it would really help if I coded it myself). It also contains a script called mergecsv which merges statistics for two books by adding the count of the words.

Download (with openAnything, mergecsv, common.txt, unittest (booktest.py, sample book of Alice in Wonderland and Sherlock Holmes): book.tar.gz
Highlighted Source:

It doesn’t parse Gutenberg E-texts, but it does parse Gutenberg E-Books. (Difference being the way the start and end of the book is indicated). I don’t want to do this, because it’s almost the same thing, and the purpose of this is only to learn.

Feedback welcome!

Set my fonts right

May 21st, 2008 by Umang

Tags: , , ,
Posted in Linux, Ubuntu | No Comments »

I didn’t know I had to do this in Ubuntu to get my fonts corrected. All this time I was wondering why I got such horrible fonts while browsing. I figured that I didn’t have most of the fonts installed on Ubuntu. A quick Google search got me to an entry on ubuntu.wordpress.com on how to install Microsoft Fonts on Ubuntu. It just asked me to install msttcorefonts, and after that everything seemed set right!

Moved to Wordpress…

May 20th, 2008 by Umang

Tags: , ,
Posted in Uncategorized | No Comments »

I have moved this blog to wordpress. This is mainly because I find that YoungCMS lacked some basic features that I would’ve liked to have. (e.g. comments, sidebar links, etc).

I will still post, I will use this blog just like I used the previous blog.

I have tried to copy my previous theme onto this theme. I still haven’t tested it with IE (as I am on Linux), but I think it should render fine as I am using the same stylesheet. I was too lazy to make a YoungCMS to Wordpress app that would transfer my posts to this, so I had to manually do it. Of course, that required Markdown to be installed, but that was easy!

I’ll keep posting…

[SCRIPT] Regex tester

May 16th, 2008 by Umang

Tags: , , ,
Posted in Python, Scripts | No Comments »

I’ve made a simple script to test regular expressions in Python. Rather than test it in an IDE, you’ll keep having to change code, etc. So a simple solution, put the input text in a file and run regex.py.

Usage: python regex.py -f[OPTION] [-r | -h | -o]
Option flags:
-f[args], –file[args]  :   The with the text on which you will perform the regex
-r, –replace           :   Do a replace regex (default is match)
-o, –output[OPTS]      :   In case -r flag was used, you can specify the file in which to store the output
-h, –help              :   Displays help

Souce : regex.py
Download : regex.py

Please write to me at “umang” under this domain, for any feedback, though I don’t think it will be terribly useful to many, but it’s worth writing some scripts properly while I’m learning! I’ve moved to Wordpress, so post comments for feedback.

Umang

A great tutorial!

May 15th, 2008 by Umang

Tags: , , , ,
Posted in Python | No Comments »

I’ve just finished reading diveintopython a great tutorial on Python by Mark Pilgrim.

The title is quite precise in what it actually is. You really dive into python. You practically dive into it, and it’s not some summary. It’s a full tutorial on how to code (not just Python). You really feel like you know it well by the end of it.

Diveintopython not only acquaints you to the Python language, it also teaches you how to use python practically. I didn’t know you could do things in such a professional and organized way as he has shown.

He has extremely practical ways of explaining regular expressions, parsing HTML and XML, introspection, using HTTP services, testing code with unit testing, changing code, etc. Not only do you get to see examples, but for a few examples he has shown how you can develop them step by step, testing them, tweaking them, to fit your needs exactly, extremely systematically.

In between all this, he puts in some humour and some personal experiences that make you feel that you’re not just blindly learning something.

I recommended diveintopython for anyone who wishes to learn Python!