Exploring the Infinite Rolling MedianImagine you are asked to write a function to find a median of a given list of numbers. Easy peasy right? And given that the list is unsorted you sort it inside your function. def calculate_median(nums): if len(nums) == 0: return 0 num...May 29, 2023 · 10 min readblog.tharinduhasthika.com
Authenticating Jitsi Meetings using KeycloakAuthentication is an important aspect of the software. Jitsi, which is an open-source video conferencing platform, allows us to authenticate using different methods. This article assumes that you have a basic understanding of jwt tokens, Keycloak and...May 1, 2022 · 6 min readblog.tharinduhasthika.com
PyTorch Lightning BasicsIntroduction PyTorch Lightning is a framework built on top of the PyTorch deep learning framework for ease of use, think of it as a Keras-like API for the PyTorch framework. I have planned to write this series of articles from my own experience in us...1VJun 4, 2021 · 6 min readblog.tharinduhasthika.com
Finding Modulo of Large Fibonacci NumberFibonacci Numbers increase very rapidly as the sequence progresses, but is there a way to compute the modulo of the Fibonacci number that you are interested in. In this article I'll be explaining how I had to find this in order to complete a problem ...Jun 3, 2021 · 3 min readblog.tharinduhasthika.com
Introduction to MapReduce - Filter > Map > ReduceLanguages like Python, Javascript, and many other have a set of functions for working with lists as sort of a pipeline. These are called filter, map and reduce. These functions are originally from functional programming languages like lisp. Essential...Jun 3, 2021 · 4 min readblog.tharinduhasthika.com