Parsing & Evaluating Reverse Polish Notation in Python

The Reverse Polish Noation (RPN) is a mathematical notation to define a sequence of steps where the operator follows the operand. This post will show you how to parse and evaluate them in Python. This exercise will then allow us to go one step further and write an Infix Notation evaluator to parse standard simple…

How To Convert MRI Scans To PNG Images

If you get an MRI scan done, they provide you a CD with the images. However, these images are in a binary format and can only be viewed using the Windows based software on the CD. What do you do if you have a Mac or a Linux PC? OR if you want to share…

Basic Sorting Algorithms Implemented In Python

This post includes Python based implementation of some of the classic basic sorting algorithms. Although Python already includes the excellent Timsort algorithm implementation, this was done more as an academic exercise to not forget the basic principles of sorting.

The Best Way To Use a 32-Bit DLL Library In a 64-Bit Platform

We recently transitioned to a complete 64-Bit Windows platform across all our servers and workstation. All proprietary vendor applications already had 64-Bit versions. Almost all of our internal code, written in either Java, Python or .Net, could be easily compiled to a 64-Bit versions. However, our biggest problem was trying to incorporate our 32-Bit DLL…

Python Module Naming Pitfall

I recently ended up naming my Python .py module as the same name as one of the standard Python library modules. This caused an import exception and ended up wasting me a lot of time and left me feeling completely lost for a while trying to debug it. Here is what I did and how…

How To Generate Javadoc Style Documentation For Python

I’m a pure Java developer turned to a 50/50 Java/Python developer. Although I was skeptical about Python initially, but I’ve learned to love the language. Once you stop trying to program like Java in Python, it becomes much easier to see the Pythonic way. However, I do miss the explicitness of Java but have found…