The missing Server State Management library

State management has always been a topic of discussion in front end applications. Existing solutions such as Redux, Mobx, et cetera are oriented towards client side state management. However in this article we are going to concentrate on efficiently managing state fetched from the server.

Photo by Alireza Khatami on Unsplash

What does server state actually mean?

Any piece of data that is fetched from the server can be termed as server state. For example publications you are subscribed to, stories you have clapped for, stories that you have written are all server state. An example of client state can be the user’s theme preference (light or dark).

It can become tricky…

A guide to Component Patterns in React

Photo by Ferenc Almasi on Unsplash

Note: It is useful to have a good understanding of the React Context API in order to be able to follow this piece.

Take a look at the following code snippet from Ant Design, a react UI library. The Menu component has what it seems to be special properties called as Item and SubMenu.

<Menu.SubMenu title="SubMenu">

This way of creating components is referred to as the compound component pattern. The idea is essentially that the component in this case Menu has some logic which is shared internally amongst these properties in this case Item and…

A simpler intuitive explanation

Abbreviated as SVM, support vector machine learning algorithm is commonly used for classification problems. It gives us a better way to understand a non-linear decision boundary.

Let’s begin by considering a scenario where one might want to classify the following data —

Data set used to illustrate a simple SVM model.

It is quite evident that the data can be separated into their respective classes using a simple linear decision boundary. However, there are multiple such decision boundaries that can be used to separate the two classes. In fact, there are an infinite number of linear decision boundaries that can be drawn to separate the red and the blue…

A simpler intuitive explanation.

Super Resolution. An application of GAN (Source).

Let us assume Sergio is planning his next big heist and he needs his team to travel to a foreign country. Owing to the nature of his job he has decided to generate fake passports. He doesn’t want to take any chances because he believes that the passport officer can discriminate between original and fake passports. He has decided to use his network of designers and experts to carry out his plans effectively.

Generative Adversarial Networks have two components a generator and a discriminator. Just take my words as of now :)Let's get back to Sergio's plan and problems.

Sergio’s Passport Generator

An idea to manifestation.

Transparent Tensorflow Logo

Tensorflow has become one of the most popular deep learning libraries. It can be used by programmers, data scientists and researchers to create models out of the box by either using APIs or by writing things from scratch. It is as abstracted as your requirement.

The basic sequence of steps required while solving a machine learning problem comprises of having a data set, creating a model, training and evaluating the model and finally deploying it. We will discuss each of these steps in detail. However before that let’s discuss a few useful updates relevant to TensorFlow 2.

Eager Execution

TensorFlow 2 has…

Understanding your data better.

Photo by Isaac Smith on Unsplash

It is relatively easy to draw graphs using libraries say Matplotlib or query the data. However, to be able to draw graphs the data has to in a certain format. One of the motivations behind this article is to understand how to prepare data for further processing. The article also discusses on performing basic operations such as querying, sorting and visualising Pandas data frames.

Reading the data.

Although data can be available in multiple format but for the sake of discussion let us assume the data to be in Comma Separated Value (CSV) format.

import pandas as pd
df = pd.read_csv("path/to/file.csv")

The above…

A simpler intuitive explanation.

K-means is one of the simplest unsupervised learning algorithms. The algorithm follows a simple and easy way to group a given data set into a certain number of coherent subsets called as clusters. The idea is to find K centres, called as cluster centroids, one for each cluster, hence the name K-means clustering. On seeing a new example, the algorithm reports the closest cluster to which the example belongs based on a distance measure such as euclidean distance.

The dataset used for illustration. …

Abhishek Kumar

I enjoy to read, write and listen to music.

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