Code Monk

Tech forum for Java, algorithms & data-structures, Hibernate, RESTful API, Spring framework, Microservices architecture, Interview questions, Python, SDET, Machine learning, DevOps.

Single Abstract Method (SAM) and Functional Interface in Java

Upasana | December 16, 2019 | 2 min read | 387 views | Java 8

Interface that has single abstract method (SAM), is known as functional interface. We can supply a lambda expression whenever an object of an functional interface is expected.

Read Article

OAuth2 protected resources in RestAssured Testcases

Upasana | December 12, 2019 | 4 min read | 8,453 views | Rest Assured

In this tutorial we will cover accessing OAuth2 protected resources in RestAssured Testcases using Password and client credentials of OAuth2 grant type

Read Article

Feign exception handling in Spring Cloud

Upasana | December 10, 2019 | 2 min read | 14,648 views

Using RestControllerAdvice to Catch and handle Feign exception in Spring Cloud environment during inter-service communication

Read Article

Find missing numbers in 4 billion unique numbers with 50MB RAM

Upasana | December 08, 2019 | 2 min read | 148 views

4 billion numbers can not fit into 50MB RAM. Even if we take a bitset of 4 billion bits, it will need 4 GB RAM. we will discuss a multi-pass solution.

Read Article

What is Immutable Class in Java

Upasana | December 08, 2019 | 2 min read | 1,409 views | Multithreading and Concurrency

An object is called Immutable when its state can not be changed after its construction. Immutable objects are inherently thread-safe, thus making it easy to write multi-threading code

Read Article

Creating custom Keras callbacks in python

Upasana | December 07, 2019 | 6 min read | 633 views

In this article we will create custom keras callbacks using python i.e. logging batch results to stdout, stream batch results to CSV file, terminate training on NaN loss.

Read Article

Installing PySpark with Jupyter notebook on Ubuntu 18.04 LTS

Upasana | December 07, 2019 | 4 min read | 1,534 views

In this tutorial we will learn how to install and work with PySpark on Jupyter notebook on Ubuntu Machine and build a jupyter server by exposing it using nginx reverse proxy over SSL.

Read Article

Google Colab: import data from google drive as pandas dataframe

Upasana | December 07, 2019 | 3 min read | 4,234 views

In this Google Colab article we will learn how to import data from Google Drive as Pandas dataframe. Google Colab is a free Jupyter notebook environment that requires no setup and runs entirely on gcloud.

Read Article

Deploying Keras Model in Production using Flask

Upasana | December 07, 2019 | 7 min read | 2,395 views | Flask - Python micro web framework

This article covers process of building a Flask REST API over saved Keras model and deploy it in production. We are going to take example of a mood detection model which is built using NLTK, keras in python.

Read Article

python problem 1: find the runner-up score

Upasana | December 07, 2019 | 1 min read | 16,604 views

Given the participants' score sheet for your University Sports Day, you are required to find the runner-up score. You are given scores. Store them in a list and find the score of the runner-up.

Read Article