Get File MIME Type in Python

Get file MIME type in Python You can get file mime type in python by using python-magic library. You can install python-magic using PIP. $ pip install python-magic To find mime type, import magic library and pass file path into magic.from_file() >>> import magic >>> magic.from_file(“path/to/file.pdf”, mime=True) ‘application/pdf’ If you face error “AttributeError: ‘module’ object…

Read More

How to Delete a Git branch?

Delete a git branch This article will demonstrate, how we can delete a git branch from local or remote git repository. Syntax: git branch -d<branch> git branch -d test-branch If you face any error like “error: The branch ‘test-branch’ is not fully merged” and you are still want to delete this branch then you can…

Read More

Install Opencv in CentOS

What is OpenCV? OpenCV (Open Source Computer Vision Library) is an Open Source Library for computer vision, machine learning and image processing. You can use OpenCV with multiple programming languages like Python, Java, C++. OpenCV can be used to process the images, identify objects, face detection, real-time traffic monitoring, lane detection for automation cars, text…

Read More

Install RPM in CentOS

Install RPM in CentOS RPM Package Manager (RPM), originally called the Red-hat Package Manager, is a program to install or uninstall software packages or libraries in Linux. To install RPM in CentOS, first download the RPM: [roop@localhost ~]$ wget ftp://rpmfind.net/linux/centos/6.6/os/x86_64/Packages/opencv-2.0.0-12.el6.x86_64.rpm now check in your directory opencv-2.0.0-12.el6.x86_64.rpm will be available for installation.To install RPM in CentOS…

Read More
Verified by MonsterInsights