- Trending Categories
- Data Structure
- Networking
- RDBMS
- Operating System
- Java
- MS Excel
- iOS
- HTML
- CSS
- Android
- Python
- C Programming
- C++
- C#
- MongoDB
- MySQL
- Javascript
- PHP
- Physics
- Chemistry
- Biology
- Mathematics
- English
- Economics
- Psychology
- Social Studies
- Fashion Studies
- Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Hafeezul Kareem has Published 344 Articles
Hafeezul Kareem
11K+ Views
We have a method called astype(data_type) to change the data type of a numpy array. If we have a numpy array of type float64, then we can change it to int32 by giving the data type to the astype() method of numpy array.We can check the type of numpy array ... Read More
Hafeezul Kareem
378 Views
We have given an array of elements, and we have to make them all equal by incrementing the elements by 1. We are allowed to increment n - 1 element at each step. Our goal is to calculate the total number of operations required to make all the array elements ... Read More
Hafeezul Kareem
173 Views
In this tutorial, we are going to write a program which searches for all the anagram from a string.See some examples.Input: anagram = "cat" string = "tacghactcat" Output: Anagram at 0 Anagram at 5 Anagram at 7 Anagram at 8Let's see how to write the code. Follow the below steps ... Read More
Hafeezul Kareem
112 Views
Two strings are said to be anagrams of each if they have same characters even in different order. In this tutorial, we are going to check for anagram in Python using the collections.Counter() method.Input: string_one = "cat" string_two = "tac" Ouput: Truecollections.Counter()collection.Counter() returns a dictionary which contains frerquency of each ... Read More
Hafeezul Kareem
406 Views
In this tutorial, we are going to learn about the most common methods of a list i.e.., append() and extend(). Let's see them one by one.append()append() method is used to insert an element at the end of a list. The time complexity of append() method is O(1).Syntaxlist.append(element) -> element can ... Read More
Hafeezul Kareem
1K+ Views
In this tutorial, we are going to learn about the most common methods of a list i.e.., append() and extend(). Let's see them one by one.apply()It is used to apply a function to every row of a DataFrame. For example, if we want to multiply all the numbers from each ... Read More
Hafeezul Kareem
1K+ Views
In this tutorial, we are going to see how to make a column of names to uppercase in DataFrame. Let's see different ways to achieve our goal.ExampleWe can assign a column to the DataFrame by making it uppercase using the upper() method.Let's see the code.# importing the pandas package import ... Read More
Hafeezul Kareem
677 Views
In this tutorial, we are going to learn about the arithmetic operations on Images using OpenCV. We can apply operations like addition, subtraction, Bitwise Operations, etc.., Let's see how we can perform operations on images.We need the OpenCV module to perform operations on images. Install the OpenCV module using the ... Read More
Hafeezul Kareem
261 Views
In this tutorial, we are going to write a program that returns two numbers whose ratio is equal to the given float value. We have a method called as_integer_ratio() that helps to achieve our goal.Let's see some examples.Input: 1.5 Output: 3 / 2 Input: 5.3 Output: 5967269506265907 / 1125899906842624Let's examine ... Read More
Hafeezul Kareem
184 Views
In this tutorial, we are going to perform arithmetic operations on images using OpenCV in Python. We need to install the OpenCV module.Run the following command to install the OpenCV module.pip install opencv-python==4.1.1.26If you run the above command, you will get the following successful message.Collecting opencv-python==4.1.1.26 Downloading https://files.pythonhosted.org/packages/1f/51/e0b9cef23098bc31c77b0e0 6221dd8d05119b9782d4c2b1d1482e22b5f5e/opencv_python-4.1.1.26-cp37-cp37m-win_amd64.w hl ... Read More