python Archives

TypeError: ‘<' not supported between instances of 'int' and 'str' in Python

Author - Webner
|
0 Comments
|

Description

Sometimes there may be a need to access or simply print a python dictionary in a particular order of its keys i.e. ascending or descending as it was in my case. Although it seems that it is not a big issue and that is true in Read more…

Python OpenCV

Author - Webner
|
0 Comments
|

Introduction to Python OpenCV

Python OpenCV Usage:- For main modules- run pip install OpenCV-python

cv2.imread() method

This method loads an image from the specified file and if the image cannot be read due to some error, it returns an empty matrix.
If we specify Read more…

Linting and Security tools for python code

Author - Webner
|
0 Comments
|

What is a linter?

Linters are the tools that analyze code to detect various categories of lint which help in making code better organized, shows warnings and errors and hence, improves quality. The linters can be broadly categorized as following:

Logical Lint

Code errors

Code with potentially unintended Read more…

How to fetch unread emails from a mailbox

Author - Maniraj Singh
|
0 Comments
|

Python code to fetch Unread emails from a Mailbox

Script to check and fetch the unread inbox using the following packages.
1. imaplib
2. email
3. csv

IMAP is an email retrieval protocol which does not download the emails. It just reads them and displays them Read more…

Add Text to Image with Php and Python

Author - Maniraj Singh
|
0 Comments
|

How to add Text to Image with Php and Python

Step 1: Call the python file from PHP with the following arguments.
$ filePathForPython: Specify the location of the python file.
$imageName: Dynamic name of the image.
$ imageText: Text to be written on the image Read more…

Error while installing python packages (pyinstaller)

Author - Manju Kashyap
|
0 Comments
|

Error while installing python packages (pyinstaller)

While we were installing pyinstaller as per requirement in our window (8) system, it was causing the following error:

After struggling very much, we found that it was due to conflict with the Perl packages Read more…

SequenceMatcher in Python and Calling Python Script in PHP

Author - Mahesh Kumar
|
1 Comment
|

Introduction to SequenceMatcher in Python and Calling Python Script in PHP

SequenceMatcher is a class in Python which compares pairs of sequences of any type.SequenceMatcher is a class which comes under the difflib module. It provides classes and functions for comparing sequences. It can be Read more…