Pradeep Elance has Published 417 Articles

Python - Check if two lists have any element in common

Pradeep Elance

Pradeep Elance

Updated on 23-Dec-2019 10:09:16

4K+ Views

During manipulating data using python lists, we come across a situation where we need to know if two lists are entirely different from each other or they have any element in common. This can be found out by comparing the elements in the two lists with the below approaches decribed.Using ... Read More

Getting screens height and width using Tkinter Python

Pradeep Elance

Pradeep Elance

Updated on 23-Dec-2019 10:00:44

472 Views

Tkinter is the library which gives GUI programming capability to python programs. As part of GUI creation we need to create screen layouts of different sizes and depth. In this program we will see how to calculate the size of a screen in terms of pixels as well as in ... Read More

Boolean Indexing in Python

Pradeep Elance

Pradeep Elance

Updated on 20-Dec-2019 11:26:46

2K+ Views

The Boolean values like True & false and 1&0 can be used as indexes in panda dataframe. They can help us filter out the required records. In the below exampels we will see different methods that can be used to carry out the Boolean indexing operations.Creating Boolean IndexLet’s consider a ... Read More

html5lib and lxml parsers in Python

Pradeep Elance

Pradeep Elance

Updated on 20-Dec-2019 11:19:19

740 Views

html5lib is a pure-python library for parsing HTML. It is designed to conform to the WHATWG HTML specification, as is implemented by all major web browsers. It can parse almost all the elements of an HTML doc, breaking it down into different tags and pieces which can be filtered out ... Read More

How to assign values to variables in Python

Pradeep Elance

Pradeep Elance

Updated on 20-Dec-2019 11:07:16

4K+ Views

Variable assignment is a very basic requirement in any computer programming language. In python there are multiple ways we can declare a variable and assign value to it. Below we see each of them.Direct InitialisationIn this method, we directly declare the variable and assign a value using the = sign. ... Read More

Generating hash ids using uuid3() and uuid5() in Python

Pradeep Elance

Pradeep Elance

Updated on 20-Dec-2019 10:40:51

2K+ Views

The universally unique identifier is a 32 bit hexadecimal number that can guarantee a unique value in a given namespace. This helps in tracking down objects created by a program or where ever python needs to handle object or data that needs large value of identifier. The UUID class defines ... Read More

Find frequency of each word in a string in Python

Pradeep Elance

Pradeep Elance

Updated on 20-Dec-2019 07:19:17

11K+ Views

As a part of text analytics, we frequently need to count words and assign weightage to them for processing in various algorithms, so in this article we will see how we can find the frequency of each word in a given sentence. We can do it with three approaches as ... Read More

Find and Draw Contours using OpenCV in Python

Pradeep Elance

Pradeep Elance

Updated on 20-Dec-2019 07:13:13

3K+ Views

For the purpose of image analysis we use the Opencv (Open Source Computer Vision Library) python library. The library name that has to be imported after installing opencv is cv2.In the below example we find the contours present in an image files. Contours help us identify the shapes present in ... Read More

Facebook Login using Python

Pradeep Elance

Pradeep Elance

Updated on 20-Dec-2019 07:02:58

1K+ Views

We can use the python package called selenium to automate the interaction with webdrivers. In this article we will see the interaction between python’s selenium package and logging in to Facebook.ApproachSelenium package is used to automate and controls web browsers activity. Out python code will need the selenium package to ... Read More

Dictionary Methods in Python (cmp(), len(), items()…)

Pradeep Elance

Pradeep Elance

Updated on 20-Dec-2019 06:58:57

2K+ Views

Dictionary in python is one of the most frequently used collection data type. It is represented by hey value pairs. Keys are indexed but values may not be. There are many python-built in functions that make using the dictionary very easy in various python programs. In this topic we will ... Read More

Advertisements