Posts

Showing posts from September, 2023

Discover the Benefits of Natural Language Processing

Image
Inclusion Cloud HomepageInsights Inclusion Cloud in BlogInsights Discover the Benefits of Natural Language Processing for Your Business Natural Language Processing for Business One of the most exciting technological advancements in recent years is Natural Language Processing (NLP). NLP is a field of computer science and artificial intelligence that focuses on the interaction between humans and computers using natural language. In this blog post, we will explore the benefits of NLP and its applications for businesses.  What Is Natural Language Processing? Natural Language Processing (NLP) is a subfield of artificial intelligence that focuses on enabling computers to understand, interpret, and generate human language. This includes speech recognition, natural language generation, and natural language understanding.   What Can NLP Do? NLP can be used for a wide range of applications in business. Here are some examples:  Sentiment analysis Sentiment analysis ...

Configure Web Server in Docker and start services using Ansible Playbook

Image
STEPS TO PERFORM THE TASK : 🔹 Configure Docker 🔹 Start and enable Docker services 🔹 Pull the httpd server image from the Docker Hub 🔹 Run the httpd container and expose it to the public 🔹 Copy the html code in /var/www/html directory and start the web server. We can install ansible by: pip3 install ansible (or) yum install ansible After installing, we can check the version of Ansible. ansible --version We can create a group of IP in /root/ip.txt, in this write that Managed Node IP as a host in Controller Node. Provide the Username and password of that Managed Node. By creating groups of IP known as Inventory can helps us to do automation that Node which are in group. As we can see there are 1 group below in the figure. If we want to configurate on multiple Managed Node then we can give their IPs in one of the Group. we can give any name to group here. Since, we didn’t give any name, it consider as default. ip.txt 192.168.29.28 ansible_user=root ansible_ssh...

Create Python Menu-based program, and integrate it with multiple technologies.

Image
Introduction: System administration can be a complex task, requiring multiple tools and commands to manage different aspects of the system efficiently. To streamline this process and provide a user-friendly interface, I have developed a Python-based menu program that offers an intuitive way to handle various tasks on a Linux system. This article will introduce the main functionalities of the menu program and how it simplifies Linux management, Docker operations, web configuration, and many more to come in future. 1. Manage Linux & Partitions: This program offers a user-friendly interface with a range of convenient options for system administration tasks. Users can choose to run Linux commands. For disk management, they have the flexibility to create partitions and set up Logical Volume Management (LVM). The menu further assists users in checking mounted disks and listing available volume groups. Additionally, the Yum Configure option streamlines package mana...

Create a website using C++ as the server-side language.

Certainly! I can provide you with an example of how you can extend the existing code to create a simple blog using C++ as the server-side language. In this example, the blog will have multiple posts, and each post will be displayed on a separate page. #include <iostream> #include <string> #include <sstream> #include <fstream> #include <cstring> // Include the <cstring> header for memset #include <sys/types.h> #include <sys/socket.h> #include <netinet/in.h> #include <unistd.h> // Include the <unistd.h> header for close void sendResponse(int clientSocket, const std::string& response) { std::string httpResponse = “HTTP/1.1 200 OK\r\n”; httpResponse += “Content-Type: text/html\r\n”; httpResponse += “Content-Length:"+ “std::to_string(response.length()) + “\r\n”; httpResponse += “\r\n”; httpResponse += response; send(clientSocket, httpResponse.c_str(), httpResponse.length(), 0); close(clientSocket); } int main() { int...

Create Live Streaming Video Chat App without voice using cv2 module of Python

Image
Server Program- #!/usr/bin/python3 import socket import cv2 import pickle import struct #TCP Socket Creation tcp_sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM) tcp_sock.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1) tcp_sock.bind((“0.0.0.0”, 2323)) #Listening To Connections tcp_sock.listen() print(“Accepting Connections…”) while True: s, addr = tcp_sock.accept() print(f”Connected to {addr}!!!”) cap = cv2.VideoCapture(0) while(cap.isOpened()): ret, frame= cap.read() #Serialise/flattening Data data = pickle.dumps(photo) #Bytes Conversion packet = struct.pack(“Q”, len(data))+data s.sendall(packet) cv2.imshow(“Server Side Streaming…”,frame) if cv2.waitKey(10) == 13: cv2.destroyAllWindows() cap.release() break tcp_sock.close() Client Program- #!/usr/bin/python3 import cv2 import socket import pickle import struct #TCP Socket Creation try: skt = socket.socket(socket.AF_INET, socket.SOCK_STREAM) print(“Socket successfully created Now Show …”) except socket.error a...

Create an art or image by yourself using arrays and Numpy.

Image
Creating greyscale images with NumPy and PIL Greyscale images are handled slightly differently. Because there is only one channel, there is no need to create a 3-dimensional array, you should use a 2-dimensional array instead: import numpy as np from PIL import Image array = np.zeros([100, 200], dtype=np.uint8) # Set grey value to black or white depending on x position for x in range(200):     for y in range(100):         if (x % 16) // 8 == (y % 16) // 8:             array[y, x] = 0         else:             array[y, x] = 255 img = Image.fromarray(array) img.save('testgrey.png') In this case, we have created a chequerboard image:

Take 2 images and combine it to form a single image & Take 2 images, crop some part of both the images and swap them.

Image
To make a Collage using two images. Step1: In this step, we have Import the libraries. import cv2 import matplotlib.pyplot as plt Step2: In this step, we have read the images. img1 =cv2.imread(“msd.jpg”) img2 =cv2.imread(“msd1.jpg”) Step3: In this step, we have resize the image because Both image shapes must be the same. img3= cv2.resize(img1,(194,260)) Step4: In this step we have used hstack function because hstack function is useful to combine both the images. and ‘plt.imshow’ is used to show the output. img_collage= np.hstack((img2,img3)) plt.imshow(img_collage) Crop and Swap the cropping images we have taken 2 images for crop and swap the cropping images. first, we have import the libraries. import cv2 import matplotlib.pyplot as plt Step2: we have read two images img1= cv2.imread(‘msd2.jpg’) img2 = cv2.imread(‘virat.jpg’) Step3: This syntax is used to crop the images img3= img1[0:100, 75:145] img4= img2[15:145, 40:140] Step4: In this step, we have to reshape/resize the...

Deploy WordPress Application on Ec2 Instance with AWS RDS

Image
Task Description Let’s Begin the Task ! Step 1 : Create an AWS EC2 instance Login to AWS Account. Go to EC2 Dashboard ->> instances ->> Launch Instance a) Select an AMI. Here I am selecting Amazon Linux 2 AMI. Select AMI b) Click next and Select the Instance Type. I’ll go for default one. C) Configure Instance Details D)Add storage E) Add Tags Here we can create multiple tags like name, env etc. These tags are helpful to specify the instance. f) Configure Security Group — Here I am adding one more rule for HTTP and allowing everyone to connect with the instance. Note: It is not a good practice to allow everyone. We must create custom rules for the security of our instances. ( I have done this just for the demo ) g) Review and Launch Now, If we want to connect with this instance using the ssh protocol we need a key so here I am attaching an existing key. You can create a new one. ...

Launch a container in docker. Further, launch a container then install docker in it and again launch a container in containerized docker.

Image
In this article, We will discuss Launching a container in docker. Further, launch a container then install docker in it and again launch a container in containerized docker. To accomplish this, you’ll need to have Docker already installed on your host machine. If you haven’t installed Docker yet, you can follow the official Docker installation guide for your respective operating system: https://docs.docker.com/get-docker/ Once Docker is installed on your host machine, follow these steps to launch a container, then install Docker inside it, and finally launch a container within that containerized Docker: Step 1: Launch a Container Let’s start by launching a simple container. We’lluse the nginx image as an example, which is a popular web server. # Launch a container using the nginx image docker run -d — name my-nginx nginx Step 2: Install Docker inside the Container Now, we’ll enter the container you just launched and install Docker inside it. # Enter the container docker exe...

GUI container on the Docker. Launch a container on docker in GUI mode. Run any GUI software on the container.

Image
Step — 1: Start the Docker Service We need to make sure the Docker Service is up and running. systemctl is-active docker This command checks whether the Docker Service is active or inactive. systemctl start docker This command starts the Docker Service. systemctl status docker  This provides a detailed overview of the docker service . # Allow X server con # Installing the sources for the locales RUN yum install -y glibc-locale-source # Setting up the default locale to en_US.UTF-8 RUN localedef --no-archive -i en_US -f UTF-8 en_US.UTF-8 && \      export LANG=en_US.UTF-8 # Installing Necessary packages including firefox RUN yum install -y dbus-x11 PackageKit-gtk3-module libcanberra-gtk2 firefox # Generating a universally unique ID for the Container RUN dbus-uuidgen > /etc/machine-id # Starting Firefox application CMD /usr/bin/firefox glibc-locale-source is the source file of many locales. dbus-X11 is X11 -requiring ad...

Fun commands in Linux

Image
Some funny Linux Command with example:- Command: factor Time for some Mathematics, this command output all the possible factors of a given number. Command: Cowsay An ASCII cow in the terminal will say whatever you want. Command: yes It is funny but useful as well, especially in scripts and for System Administrators where an automated predefined response can be passed to the terminal or generated.