Get File MIME Type in Python

Get file MIME type in Python You can get 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 () >>> import magic >>> ("path/", mime=True) 'application/pdf' If you face…
More..

How to Delete a Git branch

Delete a git branch Delete a local branch : 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 forcefully delete. Use 'git branch -D test-branch'…
More..

Install Opencv in CentOS

Install opencv in CentOS Opencv can be install in CentOS in two ways: 1) Install from available yum repository. But till the time of writing this post repository are available. If you need latest version of opencv then go for 2. option. 2) Opencv installation from source. 1) Install opencv…
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: $ wget now check in your directory will be available for installation. To install…
More..
TechieRoopTutorials, Programming Solutions, Tips & Tricks 2017