Tranquil Scottish Highlands

No two journeys are ever same. However few are bit more special, both in magnitude as well as expectations. Our first trip to Highlands certainly fell into this category. I spent weeks planning for this one, from accommodation, to list of places, to routes, to activities, even the vehicle. We started on Saturday with Inverness being our first stop. Although we missed our chance to spot dolphins, we did come across some serene places. Next Read more…


Eerily Beautiful Glasgow Necropolis

After being in Glasgow for about a year, a visit to Central Cathedral and Necropolis was long overdue. This was still one place where I always wanted to take Misbah along, but  never could, due to something or the other. Finally this weekend after being under the weather all night, I lost my senses and dragged her along for a stroll to Glasgow Necropolis in-spite of rains. Luckily sun god showed mercy on us when Read more…


Day Count Convention In Bonds

Day-count convention is used to calculate accrued interest between coupon payments. This convention helps to determine the number of days between payment, thus helping with calculation of how interest is accrued over a period. This convention dictates how the period between payments is calculated, by deciding numbers of days in a month and a year for below. Coupon Value Calculation: For sub annual coupon payments, day-count convention are used to calculate fraction of year on Read more…


functools Module In Python

As per python docs “The functools module is for higher-order functions: functions that act on or return other functions.“ Partial Star of functoolsis certainly partial, which provides ability to set a subset of arguments expected by a function. This partially set function can now be passed to the next consumer to provide rest of the arguments and finally invoke the function. Objects returned by partial are instances of Partial, and can further be chained if Read more…


Writing A Quicksort In Python

There are few ways we can write a quick sort algorithm in python. Following are few flavors to achieve this. Quick-Sort with First element as pivot View the code on Gist. Quick-Sort with Mid element as pivot View the code on Gist.