Monday, October 16, 2017

Creating a Simple Bot with Dialogflow (Formerly Api.ai)

Dialogflow (formerly api.ai) is kind of a framework from Google which is used to interact with your product by building engaging voice and text-based conversational interfaces powered by AI.


Here are the simple steps to build a weatherbot which will fetch the realtime weather from Yahoo. Dialogflow interacts with Yahoo Weather by means of an Python API deployed in Heroku (with GitHub).

  1. Open https://dialogflow.com/ and click sign up.
  2. Sign in with your Google Account.
  3. Once logged in, click on create Agent 


    4. Enter the name of the bot and click save
    5. Goto Intents and click Create Intent



6. Enter the intent name as weather-intent and enter the text under “User says” as required. This will be text which would be considered as input or recognized from your speech. Enter "yahooWeatherForecast" under action name (This is the action name in our python code available in Github). Click “Save”


8. If you don’t have an account in heroku, you will be asked to Signup
9. After Signup, you will be asked for Appname and choose region.
10. Enter a Appname and click “Deploy App”

11. Enter https://weatherbotdemo.herokuapp.com/webhook in the browser, you should get as “Method Not Allowed” if the app is successfully deployed. We will get this error since GET is not allowed.

12. Enter the webhook URL under fulfillment in Dialogflow and click Save.

13. Click on Intents in Dialogflow and select “Use webhook” under fulfillment. Click Save.

14.  Enter the text in try it now as "how is weather in location_name ?"




Thursday, October 5, 2017

Introduction to Data Science and Machine learning

Data science :


  • Data means facts and statistics collected together for reference or analysis.
  • Science means Systematic study of the structure and behavior of the physical and natural world through observation and experiment.

Data + Science = Data Science is nothing but extracting the knowledge and insights from the collected data in either structured or unstructured form.

Now you might think that Data Science is similar to Data Mining , which is the term which we are very familiar with for quite long time. The answer is “NO”. Data Science by itself contains Data Mining but Data Mining is not equivalent to Data Science.


Img Src : https://goo.gl/nTTGS2



Machine Learning :



As the name suggests, Machine Learning (ML) is nothing but training a Program to perform better with the experience. It’s like the more you make the machine to practice , the more efficient it would be.

Tom Mitchell defined Machine Learning as “A computer program is said to learn from experience E with respect to some task T and some performance measure P, if its performance on T, as measured by P, improves with experience E.”

A simple example would be the recommendations in Online sites. Let’s say you are trying to buy a new iPad, then you are most likely to buy a cover for it. So the cover for your iPad will be shown in the recommendations.

But you should keep in mind that, it’s not always possible to train a machine with the set of expected inputs/results. There are different types of Machine Learning to make the machines learn or to train it ;)

Machine Learning is done with the help of Data Science. Machine Learning algorithms learn from Data, so basically we are implementing Data science in ML.

Does Machine Learning is another term for Artificial Intelligence ? My answer would be “NO”. Machine Learning is a part of Artificial Intelligence which works well with Data Science.

The different Machine Learning Categories are,

  • Supervised Learning
  • Unsupervised Learning
  • Reinforcement Learning

Machine Learning & DataScience are the current buzz words in industry which has given birth to new kids like Chatbots, IOT (Google Home, Amazon Alexa...) etc.,etc.,

Saturday, July 15, 2017

What is meant by Microservices ?

Microservice is an approach to develop an application by putting a number of smaller services together. The services are built based on the functionality / business need of the application and it simply means a small independent service. This makes one to understand the application much easier.

Micro-service could be considered as subset of SOA (Service Oriented Architecture). Micro-services are independently deployable whereas SOA is group of micro-services. In simple words, the components may belong to the same application in SOA but Micro-services are independent services.
The major advantage of microservices is greater scalability and easy maintainability. Each service has it's own data model,database etc., and can be deployed independently.When a service is down or not working, it impacts only a specific functionality and not the entire system.

A simple example of micro-service implementation is Shopping Cart. The service take care of only the task of placing the Order and it does not have to worry about tasks regarding customer details, payment and so on.

Infact there is no difference between Microservices architecture and Service Oriented Architecture (SOA). Microservices are not completely new, it's just a new term for existing implementation.
As we are moving towards cloud and more applications are being deployed in Cloud, Microservices play a key role.Normal server side applications would handle business logic, provide services to client and perform database operations. Any minor change in the application would need a complete redeployment of the whole application and it would bring the complete application down when it's being redeployed. Extensive resources are also needed to scale such applications.
Cloud applications should be failure resistant. And making normal server side applications to be failure resistant is tedious and requires extensive resources. Microservices makes this task easier. Incase of failure, it's easy to fix or redeploy the specific service. It will impact only one specific task of application and rest of the application will resist and runs undisturbed which means higher availability.

Microservices Architecture enable continuous delivery and deployment. Microservices are emerging rapidly and is becoming one the preferred styles for developers and architects.

Sunday, March 5, 2017

What is Internet Of Things (IoT) ?

Internet of Things , the name by itself suggests that it is nothing but a group of objects connected by means of internet. The term is commonly referred to as IoT. It's internetworking of physical devices which includes household appliances, vehicles and so on. The devices collect and transmit the data over the internet as needed.

IoT makes one to sense the status and control the objects remotely. A simple example would be like, Let's say you want to switch off all the lights and fans when you exit from home, you just need to program in such a way. All the lights and fans will get switched off when you exit !



Image Credit : https://www.fiware.org



IoT makes our work more simpler. Another example is like, let's assume that the road which you usually travel has very high traffic. You might be able to get instruction in advance to get an alternative route to reach the destination much faster.

It provides tremendous opportunities which we can't even imagine since all the devices are connected by means of Internet. There are multiple companies working on IoT concept and Google is one major investor working on it. There are multiple other appliance companies which are working with Google in implementing IoTs.

Google is primary focusing on Home Automation, Driverless cars and so on. Most of the Google's IoT inventions are available only in United States and is expected to be available across the world soon.


Though IoT is a buzz word in recent times and named couple of years back, the IoT development was there since decades. IoT is also closely associated with machine learning, artificial intelligence, big data and many others. Internet of Things is one of the biggest transformations we have in recent times and for sure it will rule in future.

Sunday, January 1, 2017

Amsterdam Marathon 2016 - My Experience

Running a marathon is one of the most exciting experience of my life. I believed that I couldn’t and wouldn’t be able to run a half-marathon ever in my life but I broke my belief. I am not an athlete or an avid runner till I have started thinking of running a half-marathon.
I have started my practice three months before and I was inspired by my friend Mr. Gopinathan who is an avid runner. During my initial days I was not even able to run 1 KM but I practiced everyday morning with short distances. On weekends I tried to run slightly longer distances than I usually do in weekdays. Gradually I started covering more distance as the practice continued and it has boosted my confidence.
I was able to cover 17 KMs in one and half months. At some stage I thought that I would not be able to run a half-marathon this year but still I kept practicing. A month before the event, I was able to cover 20 KMs. A bunch of our friends then registered for Amsterdam Marathon.
Running a marathon was a dream. I felt more confident with my current performance and have tested myself in Brussels Marathon on 2nd October 2016 which is just two weeks before Amsterdam Marathon. I couldn’t believe myself , I have completed it in 2hr 30mins.

Brussels Marathon - Finish


Then came the day for Amsterdam Marathon at historic Olympic stadium. The weather was hot than usual and we arrived at the venue by morning. The half-marathon event is scheduled to be at noon. We were all super excited. 
Then it’s the time to start half-marathon. A bunch of our friends geared up to the start line (Of course after a lot of snacks ;) ) equipping our self with nice Group T-Shirts, BIB & with a bunch of accessories. The race began and we started to carry a bunch of energy and excitement in exploring Amsterdam. The support from the crowd was outstanding.
After I ran for about 18 KMs , I was completely exhausted. The weather became more hot than usual. When I have just started to walk, there were a bunch of kids who just read my name in my BIB and shouted “Come on Ramesh…!” .I don’t know where the energy came from ! I started to run again, slowly and steadily.

Amsterdam Marathon - Finish


Finally I reached the Olympic stadium. Looking at countdown every 100 meters. The finish mark began to glitter and seemed to be waiting for me ! Yes, finally I reached and completed Amsterdam Half Marathon in 2 h 31min. The happiness, confidence, energy and the excitement I got after crossing the finish line is incredible.
Trust me ! Running marathons are super fun ! Definitely you will feel like a Champion !

What is oAuth 2.0 ?

Almost every one of us is using services of Google, Microsoft, Facebook, Apple etc., every day, either directly or indirectly. We see in mos...