OD Command in Windows with Python

I have seen OD command for last two years but had never bothered to look it up. It always remained under the surface.

Life went on well without it, until now.

During a recent debugging crisis, had to resort to this command for an efficient way to check binary results. All the while had to go to Linux and copy the files. This is when I knew I have to see what this OD is?

OD is octal dump. Simple functionality, don’t know if there is a windows equivalent. So before searching for a windows equivalent, I knew I can replicate this in python and here’s my first attempt.

Works for me and suits my requirement. Not an entire mimic of actual OD command but if you are looking for long and double precision values, this does the job.

I have kept the command line arguments similar to the actual OD command. Here’s a simple demo.

As always, the code is available from my github repo here. Hope to add more functionality as and when I get more time. Please free to fork and play around.

Special thanks to Andy for introducing the command and helping me make sense of the important arguments.

A Mac App for Your Windows

Dictionary App

I am using Mac OS for more than 10 months now and every day I am loving it more… It’s the little tweaks and apps that make using it such a pleasure.

One of them is the quick Dictionary available at finger tips across all apps. Select a word, press the shortcut key and the meaning pops up. (Shown in image above). Made reading of ebooks on Mac so much fun.

Missed this feature so much when working on windows, created a similar app in windows. Uses dictionary.com, Oxford online dictionary and google to get the meaning of the selected word.

Here’s the fruit of two days of intermittent work.
Download the App as Zip file

No installation. Unzip. Click on the executable.

How to use:
1. Select the word.
2. Click F10

Use F11 to use google and use F12 for online Oxford dictionary.

Unlike the Mac app, this app needs online access to work!!

A neat trick to use notepad as logger


Here’s a simple trick in notepad that I have been using ever since I remember. I am surprised how few know about this.

Use notepad to log anything in 3 steps

  1. Open notepad.
  2. In the very first line input this .LOG Yes ‘dot’ followed by the word ‘log’ without a space.
  3. Save and close the file.

That’s it. You can choose whatever name you want.

Now whenever this file is opened, it gives you a convenient time and date. Just write your log entry after the date and time stamp and close.

Convenient isn’t it!!

Know any other trick similar to this, Would love to know about it. Share it here.

Let It Snow in Fortran

It all began with google’s “let it snow” ester egg.

As soon as I saw the snow tumbling down my browser, I wanted to do the same with fortran.

Snow animation in fortran.
Graphics is not fortrans strong point. But luckily it has help from pgplot and I was tinkering with it for some time, so creating snow with fortran was an interesting challenge.

The physics was simple, a vertical cos wave did the trick and then I just had to control the speed and viola I had snow in fortran.

I will admit, the video i posted for happy new year for that snow animation do not do full justice to the actual program. So here’s the actual executables for anyone to try on their windows system.

Download the executable

Go ahead try. They are awesome. In fact I love them more than google’s snow.

I did these animations in a hurry to meet the new year, so the code is still not fit for wider audience, please be patient, will post the code soon. Hopefully in a format that it can be used to actually snow. 😉

Till then, let it snow.

There’s something magical about seeing those white flakes tumble down!!

Download the programs here

How to use pgplot in windows with Intel Fortran?

Using PGPLot library requires these steps.

  1. Download the Source code
  2. Create the binary font file
  3. Create the pgplot library
  4. Use the above two files to create pgplot programs.

This previous post titled Installing and using Pgplot in windows explains how to accomplish the first three tasks.

Now if you are using windows and want to just use these libraries to create graphs from your fortran program, then i have compiled the pgplot library and the font file for you to use.

You can download the same from this link . This is a pre compiled 32 bit windows pgplot library and the binary font file.

You can use these two files and get straight to creating Pgplot programs.

The zip file includes a make.bat which can be used to create the Pgplot programs.

Download the PgPLOT library