Pradeep Elance has Published 445 Articles

html5lib and lxml parsers in Python

Pradeep Elance

Pradeep Elance

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

647 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

9K+ 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 Circles in an Image using OpenCV in Python

Pradeep Elance

Pradeep Elance

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

6K+ Views

The OpenCV platform provides cv2 library for python. This can be used for various shape analysis which is useful in computer vision. In this article we will identify the shape of a circle using Open CV. For that we will use the cv2.HoughCircles() function.Finds circles in a grayscale image using ... Read More

Find and Draw Contours using OpenCV in Python

Pradeep Elance

Pradeep Elance

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

2K+ 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

744 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

1K+ 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

Dictionary Methods in Python (update(), has_key(), fromkeys()

Pradeep Elance

Pradeep Elance

Updated on 20-Dec-2019 06:53:26

375 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

To print all elements in sorted order from row and column wise sorted matrix in Python

Pradeep Elance

Pradeep Elance

Updated on 19-Dec-2019 12:44:33

174 Views

Sometimes we need all the elements of a matrix in a sorted order. But as a matrix is in form of rows and columns, we do not apply the usual sorting algorithms to get the result. Rather we use the below user defined functions to get the elements sorted.Example Live Demodef ... Read More

Advertisements