Skip to main content

Posts

Take 2 images, crop some part of both the images and swap them

  Libraries Required for this  1.numpy 2.Matplotlib 3.opencv Taking input from the user using img1 = cv2.imread("imageone.jpg") img2 = cv2.imread("imagetwo.png") Converting both the images into RGB format from BGR img1 = cv2.cvtColor(img1,cv2.COLOR_BGR2RGB) Showing image using Matplotlib plt.imshow(imagename)

Take 2 images and combine it to form a single image using opencv

  Libraries Required for this  1.numpy 2.Matplotlib 3.opencv Taking input from the user using img1 = cv2.imread("imageone.jpg") img2 = cv2.imread("imagetwo.png") Converting both the images into RGB format from BGR img1 = cv2.cvtColor(img1,cv2.COLOR_BGR2RGB) Showing image using Matplotlib plt.imshow(imagename)

Implement the concept of template in python & the concept of do while loop in python.

 

How to run Docker inside Docker Container?

Step 1 : Docker pull centos Step 2 : 1. mkdir storage           2. cd storage/ Step 3 : docker run -it --privileged -v /root/storage:/var/lib/docker --name os1 centos 1.    We used  privileged  mode because to run docker engine inside docker container it will be failed due to some security reason. A  privileged  container means it have all root capabilities of host machine 2.    Docker store all data like containers, images, networks, plugins and many mores inside in one place that is  /var/lib/docker,  so this folder is most important folder. We know if we terminate any container than all the content inside the container will be removed. So, for that reason we create a folder that is  mystorage  inside in host machine and linked this folder with that folder  /var/lib/docker  means we create a persistent storage of that folder  /var/lib/docker Now we install docker on  centos  environment   for that first we create a  repo  file inside in  /etc/yum.repos.d Step 3 : vi /etc/yum.repo

Run any GUI software in docker container

 

date command in Linux with examples

  Date command is used to display the system date and time. date command is also used to set date and time of the system. By default the date command displays the date in the time zone on which unix/linux operating system is configured.You must be the super-user (root) to change the date and time. 

Some 5 Funny Commands in Redhat linux

  Some Special fun commands in linux