Multi-module Multi-feature gradle project

Introduction So you are starting new backend work and have planned to use spring boot because of existing java development skills in the team. For me when i’ll be in this situation i’ll be like Why would I choose spring boot? A LOT of boilerplate code is removed Have strong Spring framework support Good Support of DB layer more here(https://thorben-janssen.com/what-is-spring-data-jpa-and-why-should-you-use-it/) Handy and configurable Spring security Easier management of profiles Ready to use starter-packs And not to forget spring integration And many more plug and play components If you have ever developed a servlet/jsp based application then you will find there is no web.

Angular App and Spring Boot Api for Country, State and City

Introduction Address WebApi and test example to display Country, State and City Prerequisite Java SDK node.js Building Backend https://gitlab.com/address-api/api-server.git Create Database in mysql create database address_api_db; Export Env variable MYSQL_HOST=localhost MYSQL_PORT=3306 MYSQL_SECRET=my_super_secret_password Execute maven command to run project ./mvnw spring-boot:run API Details Name Path All Countries http://localhost:8080/country/all State By Country http://localhost:8080/state/all?countryId={countryId} City By State http://localhost:8080/city/all?stateId={stateId} Building Frontend https://gitlab.

Play Video Using video.js and videojs-hls-quality-selector

Introduction How to play hls video in Angular using video.js and show quality-selectors Create simple angular App and use following commands to instal video js components npm install --save video.js npm install --save videojs-hls-quality-selector npm install --save videojs-contrib-quality-levels video-player.component.html <video id="my-video" class="video-js vjs-default-button vjs-big-play-centered" controls playsinline preload="auto" width="640" height="480" data-setup="{}" > <source src="{{this.url}}" type="application/x-mpegURL"/> <p class="vjs-no-js"> To view this video please enable JavaScript, and consider upgrading to a web browser that <a href="https://videojs.

Raccoon Image Detection using Keras

Overview This post is about identifying raccoon in an input image. We will collect raccoon images and find the cordinates in the images where our image object can be identified. This techinique is termed ad Image Annotation. For sake of simplicity we will follow bounding box annotation. Here we will have location of the image identified in (x1, y1) & (x2, y2) cordinates. For each Image we will map images and its cordinates.

Simple Apache Kafka Connector

Overview Apache kafka connect can be used to get source data inside application from external data sources such as: JDBC Connection NoSQL MongoDB Streaming Service eg. Twitter etc Following is the simplest useful place for kafka-connect in data pipeline link Solution There is a standard approach to implement kafka connect in an application given below: SourceConnector Implementer of this class has access to basic properties, config map and few callback methods.

Ensemble Techniques

Overview Help the marketing team identify potential customers who are relatively more likely to subscribe term deposit and thus increase their hit ratio Problem Statement Using the collected from existing customers, build a model that will help the marketing team identify potential customers who are relatively more likely to subscribe term deposit and thus increase their hit ratio. Solution General and domain knowledge assumption This problem statement relates to banking and financial sector.

Featurization Model Selection and Tuning

Overview The data contains features extracted from the silhouette of vehicles in different angles. The purpose is to classify a given silhouette as one of three types of vehicle, using a set of features extracted from the silhouette. The vehicle may be viewed from one of many different angles. Solution Importing Necessary libraries # NumPy: For mathematical funcations, array, matrices operations import numpy as np # Graph: Plotting graphs and other visula tools import pandas as pd import seaborn as sns sns.

Unsupervised Learning classify a given silhouette as one of three types of vehicle

Overview The data contains features extracted from the silhouette of vehicles in different angles. The purpose is to classify a given silhouette as one of three types of vehicle, using a set of features extracted from the silhouette. The vehicle may be viewed from one of many different angles. Solution Import Necessary Libraries # NumPy: For mathematical funcations, array, matrices operations import numpy as np # Graph: Plotting graphs and other visula tools import pandas as pd import seaborn as sns # sns.

Supervised Learning Thera Bank case study

Overview The classification goal is to predict the likelihood of a liability customer buying personal loans. Solution #Import Necessary Libraries # NumPy: For mathematical funcations, array, matrices operations import numpy as np # Graph: Plotting graphs and other visula tools import pandas as pd import seaborn as sns sns.set_palette("muted") # color_palette = sns.color_palette() # To enable inline plotting graphs import matplotlib.pyplot as plt %matplotlib inline # Import CSV data using pandas data frame df_original = pd.

Custom Userinfo in spring boot resource server

Spring Resource Server When implementing a standalone Resource Application server, we do not store any information related to user. We heavily rely on third party auth service providers to give such information on user’s consent and update it. This can give rise to implement OncePerRequestFilter where in we get bearer token in header and process plenty of information to read/write on db or calling userinfo api from auth server. Say for example, in sub key you are getting only id or usually a username field, what resource server usually do is validate this user_token by

Apache Kafka Simple Producer And Consumer

Introduction Hello, now that you know how to use Apache Kafka Buzz Wordsin a technical discussion, it is also necessary to know how to write a plain system and understand its working. Before that, a small theory, why do we even need apache kafka when our system is highly available on a perfect hardware across multiple regions, hosted on the best cloud service provider and written in the best software technology present @this time.

Apache Kafka Buzz Words

Introduction Hello everyone, in our academics we have read a lot about distributed system taking over the future. Apache kafka is one such distributed system. Few buzz words associated with apache kafka are topics, records, partitions, replications, cluster, broker, logs and not to metion the most widely used terms producer and consumer. A kafka cluster consist of multiple brokers. A kafka topic is split into multiple partitions. By default the partition is num.

Creating Row hash in SQL for Relational Data

Introduction How to create row hash for columns from multiple table in sql. There exists a lot of excryption and compression function in mysql https://dev.mysql.com/doc/refman/8.0/en/encryption-functions.html. We shall use https://dev.mysql.com/doc/refman/8.0/en/encryption-functions.html#function_md5 in this example. Create Database and Table structure drop database if exists test_md5; create database test_md5; use test_md5; CREATE TABLE if not exists `test_users` ( `id` bigint(20) NOT NULL AUTO_INCREMENT, `username` varchar(255) not null, PRIMARY KEY (`id`) ); CREATE TABLE if not exists `test_posts` ( `id` bigint(20) NOT NULL AUTO_INCREMENT, `title` text NOT NULL, `user_id` bigint(20) NOT NULL, PRIMARY KEY (`id`), KEY `fk_post_user` (`user_id`), CONSTRAINT `fk_post_user` FOREIGN KEY (`user_id`) REFERENCES `test_users` (`id`) ); Add dummy data to tables -- Users insert into test_users(username) values('john'); insert into test_users(username) values('jane'); -- Johntest_posts's Content insert into test_posts(title, user_id) values('hey i am john, this is my very first post', 1); insert into test_posts(title, user_id) values('hey i am john, this is my very first post', 1); insert into test_posts(title, user_id) values('hey i am john again, i\'ll be going off from website for couple of days', 1); -- Jane's Content insert into test_posts(title, user_id) values('hey i am jane, this website looks a biut dry', 2); SQL Script to get row hash in relational table SELECT posts.

Connection refused in Angular Docker App

Overview Let’s say you have created a beautiful looking Angular App which works well on local host. You now are planning to dockerize it. At very basic, you would create Dockerfile and follow these steps: Extend from node image Create new app directory inside the container Copy package.json to this new place Install npm Install Angular CLI Copy current directory contents to container's directory And then finally, execute npm start Complete file looks like this:

HLS & DASH Video Streaming

Overview We all have used media platforms likes YouTube, Netflix, PrimeVideo, DailyMotion etc. Multi-media industry has evolved over the period of time and has been one of the main area of technical advancement. Multi-media solutions, platforms and technology has moved at rapid pace in last decade or so. Considering the adoption rate for newer technologies, media domain stands first and should be followed by ecommerce etc. With everyone getting access to high speed internet, demand for consuming media content particularly videos has rapidly increased.

Micronaut Basic Authentication

Create a project Run mn create-app basic-auth to create a new project from scratch. Add Security module to project Head over to basic-auth project and open build.gradle file. Add following code snippet in build.gradle file dependencies implementation "io.micronaut:micronaut-security" Implement AuthenticationProvider Now that we have created a project and added security module, lets implement AuthenticaionProvider interface and provide a concrete implementation. For our basic use-case we would say that username=password=x where x is any value.

About me

My name is Ashish Agre nameof @silentsudo for gitlab/github/stackoverflow/* profiles. This is my general technology and story blog where i would talk about my experiences on working in Information Technology Industry. Little More I rock a decent wierd beard I like Astronomy & Astrology I am a noob csgo player named fõrg In TV Series, I like HIMYM  Professional Experience I have solid understanding of Computer Science fundamentals, algorithms and data structures.