Skip to content

Instantly share code, notes, and snippets.

{
"basics": {
"name": "Anand R",
"label": "Sr. Staff Software Engineer",
"email": "[email protected]",
"phone": "(408) 212-0297",
"url": "https://rathnas.com",
"location": {
"city": "San Ramon",
"region": "CA",
@anandrathnas
anandrathnas / Utils.md
Created December 29, 2024 19:36
A4 Printable monthly calendar
@anandrathnas
anandrathnas / lru.md
Last active August 2, 2024 08:24
LRU

Use replit for collab and design a data structure that follows the constraints of a Least Recently Used (LRU) cache.

Discards the least recently used items first. This algorithm requires keeping track of what was used when, which is expensive if one wants to make sure the algorithm always discards the least recently used item. General implementations of this technique require keeping age bits for cache-lines and track the Least Recently Used cache-line based on age-bits. In such an implementation, every time a cache-line is used, the age of all other cache-lines change. The access sequence for the below example is A B C D E D F.

LRU

In the example once A B C D gets installed in the blocks with sequence numbers (Increment 1 for each new Access) and when E is accessed, it is a miss and it needs to be installed in one of the blocks. According to the LRU Algorithm, since A has the

@anandrathnas
anandrathnas / Appam.md
Last active March 20, 2025 02:13
Recipes

Appam

Ingredients

  • 1 cup rice flour (idiappam flour)
  • 1/2 cooked rice
  • 1/4 grated coconut
  • 1 tea spoon yeast
  • 1 tea spoon sugar
  • salt

Create a branch from current and push to remote

git checkout -b branch_name
git push --set-upstream origin branch_name

Get remote repo url

git config --get remote.origin.url