## Merge Images Horizontally and Vertically Using Python

There are several websites that have applications/tools to merge images online. Sometimes it becomes very irritating if websites put limitations on the number of images that you can combine or on the number of merged files. I faced this problem when a website did not …

## Python Code to Reduce and Compress Image Files

As a large number of Internet users use cell phones to access online contents, Google started penalizing the websites that are slow and take several seconds to download all the data. If your web pages have only text data, you may not have to worry. …

## C Program for Fibonacci Numbers With and Without Recursion

The numbers in the Fibonacci sequence follow the following pattern: every number after the first two is the sum of the two preceding ones. First few numbers in the Fibonacci series are as follows: 0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89. The first two …

## Python : Using Matthews correlation coefficient (MCC) as Evaluation Metric in XGboost

In XGboost classifier, if you do not specify the value of the parameter ‘eval_metric’, the default value is used according to the value of the objective function (e.g. rmse for regression, and error for classification, mean average precision for ranking). Matthews correlation coefficient (MCC), which is …

## Extended Euclid algorithm for GCD in Python

Euclid’s recursive program based algorithm to compute GCD (Greatest Common Divisor) is very straightforward. If we want to compute gcd(a,b) and b=0, then return a, otherwise, recursively call the function using a=b and b=a mod b.

## Quick Sort Algorithm in Python

Quicksort, aka partition-exchange sort, is a divide and conquer algorithm. It’s an efficient algorithm that takes O(nlogn) time to sort n items (on average). In the worst case, it might take O(n2) time.Quicksort first divides a large list/array into two smaller sub-arrays using a pivot …