Skip to main content

Posts

Virahanka Numbers : An Application of recursion

Brief History Of Computer. The computer as we know it today had its beginning with a 19th century English mathematics professor name Charles Babbage. He designed the Analytical Engine and it was this design that the basic framework of the computers of today are based on. But recursion seems to be existing much before we thought of a machine for calculation. Here's the Virahanka's problem in brief : Find number of of poetic meters with 8 beats, made of: • Short syllables, each 1 beat duration • Long syllables, each  2 beat duration  And the solution was V(D) = V(D-1)+V(D-2) for D> 2 . Given V(1)=1 and V(2)=2. Credits :  https://www.cse.iitb.ac.in/~cs101/2012.2/resources/VirahankaNumbers.pdf

Extract Translate Load

So, What it's like Extract Translate Load ?   - ETL was a solution to get analytics at scale. Once we have huge data at scale of hundreds of tera bytes or even at peta scale, we may need a HPC to ask questions on such data. Using commodity compute horizontally would be cost effective in most of the businesss cases. Initially Hadoop had its helping hand in the process, however when Spark could do it efficiently the world said "Why not?". For us to get analytics on huge data largely unstructred and from hetrogenous sources, like every other engineering problem we divided the problem so we can conquer it with ease. We made a layer to Extract, this layer would just abstract us different data sources and get us the data. Traslate layer would structure the data for us so that our logical questions would fit into the arena.Load come in where we need to distribute the compute task at hand to large commodity clusters. Here's where big data framework would be a friend at hel...

What happens if gradient is set at 1 in "Gradient descent algorithm"

So, What is gradient descent algorithm ?  - Given a feed forward netword we apply gradient descent as a fundamental function of Operation : 1. Randomly initialize : b, W1, W2, ... , Wm 2. Repeat untill convergence 3. Predict y(i) for each data point in training 4. Calculate loss J(b,w) 5. Calculate gradient of J(b,w)      b(new)   =  b(old)   -a.gradient     w1(new) =  w1(old)-a.gradient.w1     w2(new) =  w2(old)-a.gradient.w2     wm(new) =  wm(old) - a.gradient.wm 6. Update b,w1,w2,......,wm .. Simulateneously.. - When "Louis Augustin Cauchy" needed a function to find local minima he used idea of slope to iteratively move in direction guided by slope to reach local minima. - Using the same idea in feed forward networks leads to convergence of minimum error. Why gradient anyway ? So if gradient is set to 1 or in other words if we dont use gradient descent we reach to a point dir...

Whirlwind Questions : Kubernetes

What is Kubernetes ? Goole Tells :  Kubernetes is an open-source container-orchestration system for automating application deployment, scaling, and management. It was originally designed by Google, and is now maintained by the Cloud Native Computing Foundation.  What is container-orchestration ?  Goole Tells :  Container orchestration is the automatic process of managing or scheduling the work of individual containers for applications based on microservices within multiple clusters. Who are Cloud Native Computing Foundation ?  Google Tells : The Cloud Native Computing Foundation (CNCF) hosts critical components of the global technology infrastructure. CNCF brings together the world's top developers, end users, and vendors and runs the largest open source developer conferences. Why did goole let CNCF let develop Kubernetes ? - Actually its still with Google. Google partners with Linux Foundation to form CNCF. History here :  https://blog.risingsta...

3 Dimensions of a Programming Language

- I believe there are 3 broad areas for mastering any programming language : 1. Language Internals 2. Programming Constructs offerred 3. Standard library written already in that particular language. And these 3 categories are in order of priority to hone mastery in a given programming language. Priorities are always decided based on goals. So, here the premise for setting this priority is having said to have mastered such programming languge we should be able to read a large code corpus with ease and understand what the programmer who originally wrote this code intended to do with it. Why Language Internals take a first priority ? - Because we as a software enginners write a tool chain and compilers only to solve existing issues faced in some other programming language. When assembly was just making computer do its job it was difficult for a programmer to express his algorithms in faster way hence came languages like B,C, Fortran and BASIC. After some time into building this t...

Docker Internals : Demistifying Container

PID namespaces : Every running process sees only a limited set of resources. This limited resource set is identified by notion of namespace. In linux kernel for PID namespaces to be enabled CONFIG_PID_NS has to be made true. Network namespaces :  Network support at operating system level contains network interface and routing table entries.There resources are typicall shared across entire OS. This typical behaviout can be altered by notion of Network Namespaces. With particular namespce we can isolate acess to network interface and routing table created hitherto. IPC namespace :  Message queues, shared memory or socket communication can all be isolated with IPC namespce support provided by operating system MNT namespace : Mount is a process abstration which enables access to storage devices.Notion of mount space enables OS to have isolated filesystems accessible to process that are executing. UTS namespace :  UTS stands for UNIX Tim...

Typical Document Processing Operations

First rule of document pre-processing : Improper pre-processing schemes may lead to losss of lexical content. Hence, pre-processings steps are unique to a problem. Having said that there are few pre-processing steps which applies to most of the application at hand. They are : a. tokenization b. normalization  c. substitution. Other well known pre-processing steps : a. Case folding b. Stemming c. Lemmatization d. Remove misspellings e. Punctuations. What is a stemming operation ? - Process of reducing a inflected word to its root. Where inflected word is a word with extra letter or letters added to nouns,verbs and adjectives in different grammatical forms. What is lemmatization ? - Here also there is reduction in inflected word to its root, however stemming resultant need not to be a proper word in vocabulary but in case of lemmatization word has be part of the given language vocabulary. What is case folding and its usage ? - Case-folding is a part of the Unicode s...