Skip to main content


Showing posts from 2020

Dockerize a dotnet core application with SQL connectivity

Before reading this article, I am assuming that you know Docker, Dotnet core and have a dotnet core application which is trying to connect to SQL server. Read how to build aspnet core app, docker and run the docker container.
If docker container is running and you are not able to connect to database, this blog should help you fix it. 
Prerequisite -  Make sure code is working via running aspnet core locally via visual studio or command line.Port 1433 is opened for connecting to SQL server. SolutionIf you have Docker file ready, it should somewhat look like below file - 
FROM AS build-env WORKDIR /app
# Copy csproj and restore as distinct layers COPY /SampleAPI/*.csproj ./ RUN dotnet restore
# Copy everything else and build COPY . . WORKDIR /app/SampleAPI RUN dotnet publish -c Production -o publish
# Build runtime image FROM
WORKDIR /app/SampleAPI COPY --from=build-env /app/SampleAPI . WORKDIR /app/SampleAPI/bin/Produc…

Know the rasa ecosystem and train your model effectively

Hope you have read the previous blog to create chatbot using Rasa. I would recommend to read it before starting this blog.

This blog will help you understand insights of rasa ecosystem and explain how to train your model effectively.

Rasa is an open source framework for creating chatbot with natural language undertsanding. There are few important files of rasa project -

✪ domain.yml
This file contain information about intent and respective actions. For instance- basis on intent of a user, appropriate action gets triggered and response is sent back to user. '-utter' is plain text without any logic behind it, however we can create custom action which we will discuss further in the blog. intents: - greet - goodbye - affirm
actions: - utter_greet - utter_cheer_up - utter_did_that_help
responses: utter_greet: - text: Hey! How are you? utter_cheer_up: - text: 'Great, carry on!' utter_did_that_help: - text: Did that help you?
✪ endpoints.yml
Custom action can be triggered by exposing…

Create chatbot in 20 minutes using RASA

This blog will help you create a working chatbot with in 20 minutes.

For creating chatbot we need following libraries to be installed-
>> Python3
>> Pip3
>> Rasa

Lets start installing all libraries & dependencies which are need for creating chatbot.
Note: I have used MAC, therefore sharing commands related to it. You can install it on Windows, Linux or any other operating system using respective commands.

1. Install Python3
> brew install python3
> python --version #make sure you have python3 installed

2. Install Pip3
> curl -O > sudo python3
If you get issue related to Frameoworks while installing pip, follow below steps -  > cd /usr/local/lib > mkdir Frameworks > sudo chown -R $(whoami) $(brew --prefix)/*
Once installed check pip3 version > pip3 --version After python3 and pip3 is succeffully installed, proceed to next steps.
3. Install Rasa
> pip3 install rasa
After completion, rasa should be instal…

Git merge from one repo to another repo

This blog is for those who are looking for merging code from one repo to another repo.

Why I will merge code from one repo to another?
I forked from one git repo(may be some public git repo) and did some cutomization on existing code. Occasionaly, features are being introduced in main git branch and I would like to get all those features in my own git repo. In this scenario, I would like to merge latest changes in my git repo.

Here are few simple steps which will merge code from one git repo to another-

1. Clone the repo1(source git repo)
> git clone  
> git pull

2. Clone the repo2(destination git repo)
> git clone
> git pull

3. Goto repo2 (destination git folder) and checkout your prefered branch
> cd repo2
> git checkout master> 

4. Use below command to see the remote branch associated with your destination git repo
> git remote -v 
origin (fetch)
origin https://github.c…

Python, Flask, Concurrency and Windows

This blog is for those who have written a program in Python and exposed it as API using Flask. You might have written the python algorithm and will be happy to see the output. With small usage and limited users, it still works by making some configuration changes. Problem arises when you host the same API in Production where multiple users are browsing it.

Why it does not work in Production as local environment?
In production, mutiple requests come to server from mutiple locations. If setup is not tuned to cater to concurrent users, either these requests will make the API down or will be throwing exception like 'Internal server error'.

How can we configure the setup to serve concurrent users?
There are few configuration which you have to keep in mind while designing the eco system to accomodate mutiple users.

Make sure Python is installed on server. DownloadDownload pip from and run command python get-pip.pyInstall Flask using pip commands pip install FlaskOpen comman…

Enable Sitecore Item API

Q: How to enable Sitecore Item API in existing Sitecore project?

These are few simple steps to follow -

Goto Website -> App_Config -> Sitecore -> Services.Client folderOpen Sitecore.Services.Client.config file and make below changes -Set the value of Sitecore.Services.AllowAnonymousUser as 'true'<setting name="Sitecore.Services.AllowAnonymousUser" value="true" /> Set the value of Sitecore.Services.SecurityPolicy to 'Sitecore.Services.Infrastructure.Web.Http.Security.ServicesOnPolicy'<setting name="Sitecore.Services.SecurityPolicy" value="Sitecore.Services.Infrastructure.Web.Http.Security.ServicesOnPolicy, Sitecore.Services.Infrastructure" />Open Browser and access this URLhttps://<Your Sitecore Instance>/sitecore/api/ssc/item/<Your_Item_Id>You should get Item information as JSON response. 
Post your comments, if this blog helped you.

C#, Visual Studio(VS), .Net & CLR version information

C#, Visual Studio(VS), .Net & CLR version along with release date

C# versionVS version.Net versionCLR versionRelease date1.020021.01.0Feb 20021.220031.11.1Apr 20032.020052.0
2.0Nov 2005
Nov 20063.020083.52.0Nov 20074.020104.04.0Apr 20105.020124.54.0Aug 2012

4.0Oct 2013
May 20146.02015

4.0July 2015
Nov 2015
Aufg 20167.0
4.0Mar 2017
May 2017
Aug 2017
Oct 2017
Dec 2017
Apr 2018
May 20188.020194.84.0Apr 2019
Disclaimer - The above data is collected from different websites and best of knowledge. Blog does not have any liability to any descripency.