Python: 10 minute tutorial

Nope. I have not written one. But I found a great one.

http://www.korokithakis.net/tutorials/python/

I wanted to write a few words on this one. I think this is a great tutorial for someone who knows programming and wants to get kick-started on a project. For a scripting language, the typical thought process of a programmer is that, it should not require you to sit down with a book for a week to get to know it. The typical process is to sit down with an O’Reilly book as a reference and get running.

Except, sometimes, the first version of the script takes a long time. This is mostly because, one does not know the basics of this scripting language. You will be spending a lot of time trying to find out “equivalents”. What is the equivalent of a for-loop in Python. How does one do if-elseif in Pythong. Stuff like that. This tutorial does exactly that. Gives you a birds-eye view of all of these “equivalents”. Once you have that in place, you are already running.

Update: Found another great source of such tutorials here -> http://wiki.python.org/moin/BeginnersGuide/Programmers

Windows 7 : Remove a program from startup

The number of times I have had to remove a program from my start-up sequence in windows 7 is quite large. And the shocker is, the number of times that I have stumbled in trying to figure out how, is pretty large too ! XP had this option nicely nestled in the taskbar and startup menu, and it longer is there.

Anyways, there is a much easier way to do this.

1. Hit the Windows button in the bottom-left of your screen (hopefully if you havent reconfigured your start bar)

2. Type msconfig in the run-text box ; and click on msconfig.exe from the Programs Search Results.

3.  Click on the startup tab

4. Select the programs you want to disable on startup and hit apply/OK.

5. And you are done. Hope this helps.

 

Twitter fundamentals

twitterpostit-thumb(pic credit)

Just read an awesome introduction to twitter by Jennifer Laycock, or should I now say, @JenniferLaycock. She explains the practical uses of twitter using a great analogy – post it notes on a giant wall.

You should read through, and if you have not understood twitter until now, I assure you, you will have an ‘aha’ moment.

Read the article here.

Another nice article on the practical uses of twitter from NYtimes [link]

Tutorial: Add drop shadow to your pictures

As I had promised some time back in my ‘adding borders’ tutorial, I am now giving step by step instructions to add a drop shadow to your pictures.

The original picture – I name this picture milk train. This was shot in Dadri, a small station just outside of Noida, on the Delhi-Aligarh line. This is total milk country (Uttar pradesh). This is the first train, that is heading towards Delhi. Notice the number of aluminium milk containers slung on the side of the train.

milktrain

Step 1: Add a nice black border to the picture. We know how to do that. If not, go here. (quick recap – set bgcolor and fgcolor to black. Then image->canvas size ; change by % and set to 98 ; and then do the same thing with 102.

step1

Step 2: Change bgcolor back to white. Image canvas size ; change by percentage ; 110%.

step2_paint

Step 3: Now choose the magicwand tool (see above picture. I have chosen it). Click on the newly added white area. It will not become chosen. Click the del key. You should not have that area transparent.

step3_paint

Step 4: Add a new layer. Layers -> New Layer. I hope you have the layers window showing up. Else go to windows and choose layers window. You should see something like this.

step4_layer

Step 5: Click on the background layer in the above window. Select All (ctrl -a). Copy (ctrl -c).

Step 6: Click on the new layer in the layers window. Paste (ctrl-v).

Step 7: Now you should see the picture in both layers in the layers window.

step6_layer

Step 8: Now make the new layer invisible – by deselecting that layer in the layer viewer. Now you are seeing only the background.

Step 9: Make the image black and white. (adjustments -> black and white)

Step 10: Then Effects->Blur->Gaussian Blur and set the radius to 10.

step9

Step 11: Now select both layers. And click on the new layer, so it is active.  Select All (ctrl-a). Choose the move pixel tool.

step11_move

Step 12: Now, click on the image and move it slightly to the left and top. You will see the image move, but the blurred image (background) stays, You will see a nice blurred shadow stay, while your image moves. Move it to the extent you like.

step13

Step 13: Now click on merge layers.

step14_merge

Step 14: And voila you have your image with a very nice drop shadow. For best effects ofcourse, use on a white background.

final

Embed vimeo and youtube on wordpress.com

A very quick how-to on how to embed vimeo videos and youtube videos on wordpress.com – mainly for my own sakes and sanity. I keep doing this, and, each time, I forget how to do it, and I go google !. So here goes. It is a two step process for each though, but my grey cells have become greyer. What to do !

1. Make sure you are on visual mode

step1_1For youtube:

2a. Grab the URL from the youtube page (example: http://www.youtube.com/watch?v=h_KIqdS1SO0).

2b. Just type youtube=http://www.youtube.com/watch?v=h_KIqdS1SO0 within [ ]

For vimeo

2a. Grab the URL from vimeo (example: http://vimeo.com/4946315)

2b. Just type vimeo http://vimeo.com/4946315 within [ ]

3. You are done. When you publish, you will see the youtube video embedded in your post. Add text before and after the video for garnishing.

Tutorial: How to add borders using Paint.Net

Original image

Bonsai that I own (yeah yeah I know, it is fake and plastic)
Bonsai that I own (yeah yeah I know, it is fake and plastic)

– Make sure your color palette is shown (else go to window and enable)
– Set Primary color to Black and secondary to white
– Image -> Canvas Size -> choose by percentage – 95%

click to enlarge
click to enlarge

– Image -> Canvas Size -> choose by percentage – 105%

click to enlarge
click to enlarge

– Now you should see a white border on your image like this:

result1
Note the white band around the image.

Step 2
– Set your secondary color also to black
– Image -> Canvas Size -> choose by percentage – 99%

click to enlarge
click to enlarge

– Image -> Canvas Size -> choose by percentage – 101%

click to enlarge
click to enlarge

– Now you should see a black border on your image like this:

Vola ! Beautiful border around our image.
Voila ! Beautiful border around our image.

Next tutorial tomorrow would be: How to add drop shadows to images. We will take this last image and add a drop shadow to it. Stay tuned!

Support Free Software. Download Paint.Net by clicking below.

Get Paint.NET!