Posts

API Sandbox

Read More: https://smartbear.com/learn/api-testing/what-is-an-api-sandbox/ Today’s software architecture relies on APIs as core to the application in much the same way as a database or user interface are considered core components to the architecture. That reliance on APIs means that application testers have to test the application’s reaction to a variety of API responses. But, if those APIs are still in development or are developed by a third party, how can you fully test against them? This is where an API sandbox comes in. Fundamentally, an API sandbox is an environment that testers can use to mimic the characteristics of the production environment and create simulated responses from all APIs the application relies on. The API sandbox makes it possible to: reduce the cost and risk associated with calling 3rd party APIs during testing. allow for concurrent testing and development to fast-track app development cycles and reduce time-to-market. simulate error scenario...

SPARQL

Sparql can be used to query structured data sets like DBPedia. These queries can be run on SPAQL enpoints like http://lod.openlinksw.com/sparql or http://dbpedia.org/sparql/. The queries can be slightly different, but for an experienced SPARQLer (which I hope to be one day) this won't be a problem. Here are a few of my first queries, the structure will be purpose followed by the query: The urban and metro population of Patna PREFIX dbo: <http://dbpedia.org/ontology/> PREFIX dbr: <http://dbpedia.org/resource/> select ?populationUrban  ?populationMetro where {   dbpedia:Patna  dbo:populationUrban ?populationUrban;                  dbo:populationMetro ?populationMetro  . } Details of Hemmingway: prefix dbpedia: <http://dbpedia.org/resource/> prefix dbpedia-owl: <http://dbpedia.org/ontology/> select ?abstract ?thumbnail where {    dbpedia:Ernest_Hemingway ...

Redis Supported Data Types and Commands

Redis support 5 types of data types. You need to know what type of value that key maps to, as for each data type, the command to retrieve it is different. Here are the commands to retrieve key value: if value is of type string -> GET  <key> if value is of type hash -> HGETALL  <key> if value is of type lists -> lrange  <key> <start> <end> if value is of type sets -> smembers  <key> if value is of type sorted sets -> ZRANGEBYSCORE  <key> <min> <max> command to check the type of value a key mapping to: type  <key>

Wikipedia API

A collection of a number of wikipedia API links to perform a plethora of tasks: Searching : Search can be done using Opensearch or query on the api Open search method: Use url:  https://en.wikipedia.org/w/api.php?action=opensearch&search=concurrency+java&limit=10&namespace=0&format=json https : //en.wikipedia.org/w/api.php ? action = opensearch & search = zyz # search query & limit = 1 # return only the first result & namespace = 0 # search only articles, ignoring Talk, Mediawiki, etc. & format = json # jsonfm prints the JSON in HTML for debugging. Query method: Use url: https://en.wikipedia.org/w/api.php?action=query&list=search&srsearch=what+is+concurrency+java&utf8=&format=json   Titles : Once the search yields url (in case of opensearch) or titles in case of query search, each can be individually opened. In case of query search, plain text or w-test can be obtained using...

log4j experiments

2 loggers into 2 different files : log = C:/Apache24/htdocs/logs log4j.rootLogger=TRACE, stdout log4j.appender.stdout=org.apache.log4j.ConsoleAppender log4j.appender.stdout.Target=System.out   log4j.appender.stdout.layout=org.apache.log4j.PatternLayout log4j.appender.stdout.layout.ConversionPattern=%d [%24F:%t:%L] - %m%n log4j.appender.debugLog=org.apache.log4j.FileAppender log4j.appender.debugLog.File=${log}/debug.html log4j.appender.debugLog.layout=org.apache.log4j.HTMLLayout log4j.appender.debugLog.layout.Title=HTML Debug log4j.appender.debugLog.layout.LocationInfo=true log4j.appender.reportsLog=org.apache.log4j.FileAppender log4j.appender.reportsLog.File=${log}/reports.html log4j.appender.reportsLog.layout=org.apache.log4j.HTMLLayout log4j.appender.debugLog.layout.Title=HTML Reports log4j.appender.debugLog.layout.LocationInfo=true log4j.category.debugLogger=TRACE, debugLog log4j.additivity.debugLogger=false log4j.categ...

Experiential learning

I have always challenged myself to learn. In fact that's an ingredient that keeps my own sanity in place. There are days when there is no learning and just doing. Those are the kind of days I really dislike. For last nine months I have learnt to become a full stack web-developer from having an absolute zero background in software development. In this post, I want to shed some light on the way I learned and how I feel right now. I am especially going to focus on the ways you can learn anything new, maybe this is contextually more related to technology skills, but nonetheless its an interesting insight into how some of us manage to learn new things with 'ease' and some keep going through perennial struggle and mostly just give up. Just Do It Yeah, that's right. The best way to teach yourself something completely new and complicated is to just observe how it translates into reality. When we are talking about technology there is no better way to learn systems and fram...

WIKIPEDIA API and ChatBots

I have been trying to use ontological bases in my chatbot to introduce interactivity which can take the conversation forward. What I have till now : Any user query is parsed by an NLP engine to classify if the intent is any one of the preset intents. Some of these preset intents are greetings, compliments, tasks assigned in the Talentify for Business app amongst a few. If none of the intents are matched then the user query is passed in sequence to various search engines and their web results are scraped to get a metadata response generated by the search engine, which usually is a representation of the internal knowledge graph of the search engine implementation. If none of the search engines can identify that query, then the query is passed to a knowledge engine called wolfram alpha which in most of the cases can give response to even very complex queries like "what is the distance between Chennai and Bangalore in kilometres" If even that fails then a default random...