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. Solution If 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 . WORK

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 yo

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 > pip

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

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.  Download Download pip from and run command python Install Flask using pip commands pip ins

Enable Sitecore Item API

Q: How to enable Sitecore Item API in existing Sitecore project? Solution:  These are few simple steps to follow - Goto Website -> App_Config -> Sitecore -> Services.Client folder Open 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 URL https://<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# version VS version .Net version CLR version Release date 1.0 2002 1.0 1.0 Feb 2002 1.2 2003 1.1 1.1 Apr 2003 2.0 2005 2.0 3.0 2.0 2.0 Nov 2005 Nov 2006 3.0 2008 3.5 2.0 Nov 2007 4.0 2010 4.0 4.0 Apr 2010 5.0 2012 4.5 4.0 Aug 2012 5.0 2013 4.5.1 4.5.2 4.0 4.0 Oct 2013 May 2014 6.0 2015 4.6 4.6.1 4.6.2 4.0 4.0 4.0 July 2015 Nov 2015 Aufg 2016 7.0 7.1 7.2 7.3 2017 4.7 4.7.1 4.7.2 4.0 4.0 4.0 Mar 2017 May 2017 Aug 2017 Oct 2017 Dec 2017 Apr 2018 May 2018 8.0 2019 4.8 4.0 Apr 2019 Disclaimer - The above data is collected from different websites and best of knowledge. Blog does not have any liability to any descripency.