What is k-means?

Clustering is the task of dividing the population or data points into a number of groups such that data points in the same groups are more similar to other data points in the same group than those in other groups. in simple words, the aim is to segregate groups with similar traits and assign them into clusters. the goal of the k-means algorithm is to find groups in the data, with the number of groups represented by the variable k. the algorithm works iteratively to assign each data point to one of k groups based on the features that are…


When we get the data, after data cleaning, pre-processing and wrangling, the first step we do is to feed it to an outstanding model and of course, get output in probabilities. But hold on! How in the hell can we measure the effectiveness of our model. Better the effectiveness, better the performance and that’s exactly what we want. And it is where the Confusion matrix comes into the limelight. Confusion Matrix is a performance measurement for machine learning classification.

What is Confusion Matrix?

The million dollar question — what, after all, is a confusion matrix?

A Confusion matrix is an N x N matrix…


In this article we will copy a machine learning model inside a docker container and create a python program to predict the output using this model.We will create docker image for this whole setup

What is Docker Container?

A container is a standard unit of software that packages up code and all its dependencies so the application runs quickly and reliably from one computing environment to another. A Docker container image is a lightweight, standalone, executable package of software that includes everything needed to run an application: code, runtime, system tools, system libraries and settings.

Now that we know what a container actually does,we…


In this world of automation,we need rapid,fast and agile deployment.As soon as the developer comes up with new updates,it should be instantly tested and then deployed in the production environment.We will be solving this use-case in this article.

Use-Case

There is a project on which multiple developers are working.The multiple versions of the code are maintained using the VCS “Git”.A developer comes up with an updated code and pushes it to the feature branch.We need to instantly test this updated code in the Testing Environment and then deploy it in the Production Environment.We …


In this blog,we will create an Ansible Playbook which will dynamically load the variable file named same as OS name and by using the variable names we will configure webserver in our target node.

Pre-requiste

For doing this practical,you need to have Ansible installed and configured in the Ansible Controller Node.You can refer my earlier blog for installing and configuring Ansible from here.

Hope you have Ansible installed and configured.Now we can start off with our hands-on part.

Check the OS distribution and distribution version of the target node

For this,we can use the ansible facts.Ansible retrieves information about the target…


In this blog,we will launch a docker container using Ansible,retrieve it’s IP address and add it in the ansible inventory file dynamically.Then,finally we will configure the webserver on this newly launched docker container using ansible

Pre-requisite

  • For doing this practical,you need to know about docker and have docker configured in the target machine.To configure docker using ansible,you can refer to my blog in which I have explained every step in very detail.
  • For connecting to the docker container from Ansible,we need to have ssh services enabled in the container.I have created my own image using Dockerfile in which I have installed…


In this guide,we will create our own chat servers and establish a network to trasnfer data using Socket Programming.Both the server and client machine will have both Sender as well as Receiver Programs.We will use the multi-threading concept to send and receive data parallelly between the sender and receiver programs on both sides.

What is Socket Programming?

Socket programming is a way of connecting two nodes on a network to communicate with each other. One socket(node) listens on a particular port at an IP, while other socket reaches out to the other to form a connection. Server forms the listener socket while client reaches…


Restarting httpd service is not idempotent in nature and consumes more resources.In this blog,we will see how to rectify this challenge in Ansible plabook

General Approach for Restarting httpd services

The general approach of restarting httpd services in Ansible plabook is to use the service module inside the tasks block and give the state argument as restarted.

#service module inside the tasks block
tasks:
- name: service httpd
service:
name: "httpd"
state: restarted

But in this approach,the httpd service is always restarted when the playbook is executed and the idempotence nature is lost.

To solve this challenge,we can use the concept of notify and handler in…


In this blog,I will be talking about OpenShift and the success stories of some companies using OpenShift

What is OpenShift?

Red Hat OpenShift Container Platform unites developers and IT operations on a single platform to build, deploy, and manage applications consistently across hybrid cloud and multicloud infrastructures.

OpenShift Container Platform provides developers with a self-service platform for provisioning,building, and deploying applications and their components. With automated workflows like source-to-image (S2I) process, it is easy to get source code from version control systems into ready-to-run, Docker-formatted container images. …


In this guide,we will configure and start Docker services,launch a Docker container,set up python interpreter and run a python code inside the container

What is Docker?

Docker is a software platform for building applications based on containers — small and lightweight execution environments that make shared use of the operating system kernel but otherwise run in isolation from one another. While containers as a concept have been around for some time, Docker, an open source project launched in 2013, helped popularize the technology, and has helped drive the trend towards containerization and microservices

What is Docker Container?

Docker Container is a standardized unit which can be created…

Juzer Patanwala

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store