Skip to content

Instantly share code, notes, and snippets.

Keybase proof

I hereby claim:

  • I am ssbozy on github.
  • I am ssbozy (https://keybase.io/ssbozy) on keybase.
  • I have a public key ASCRWBusKU8PKcFqH2Go6joAF0aEw2SiIShAYQxz84JT2Ao

To claim this, I am signing this object:

@ssbozy
ssbozy / ObserverPattern.py
Created August 27, 2022 04:10
Basic example of observer pattern in python using Publisher and Subscriber code
class Subscriber:
def __init__(self, name):
self._name = name
def update(self, message):
print(f"{self._name} received the message {message}")
class Publisher:
def __init__(self):
@ssbozy
ssbozy / bsl.py
Created August 27, 2022 04:08
Basic binary search with logger
import logging
from typing import Optional
def create_logger(logger_type=logging.DEBUG):
logger = logging.getLogger(__name__)
logger.setLevel(logger_type)
stream_handler = logging.StreamHandler()
formatter = logging.Formatter('%(asctime)s : %(levelname)s : %(funcName)s : %(message)s')
stream_handler.setFormatter(formatter)
@ssbozy
ssbozy / rename.sh
Last active May 2, 2022 15:09
Renaming files using basename command.
#!/bin/bash
for file in *.md.html
do
mv "$file" "$(basename $file .md.html).html"
done
@ssbozy
ssbozy / pandoc_website_v1.sh
Created April 27, 2022 04:13
building a blog using pandoc and markdown files
#!/bin/sh
ROOT_FOLDER=`pwd`
POSTS_FOLDER="posts"
DIST_FOLDER="dist"
function create_destination() {
mkdir -p dist dist/assets dist/posts dist/pages
}
@ssbozy
ssbozy / pandoc_website_v0.sh
Last active April 27, 2022 04:11
building a website from markdown files using pandoc
pandoc -s -f markdown -t html5 -B ../includes/header.html -A ../includes/footer.html -o ../dist/output.html ../posts/test1.md -H ../styles/pandoc.css
{
"meta": {
"theme": "elegant"
},
"basics": {
"name": "Sandilya Bhamidipati",
"label": "Engineering Leader at Adobe",
"image": "https://secure.gravatar.com/avatar/268186232a20e762ec60ce56da748b2a",
"summary": "Engineering leader with an experience of 14+ years in people management and software engineering. I have managed engineering teams building search, recommendation and predictive analytics services. My work has been published at various top-tier machine learning conferences as well as contributed to 40+ patents. I am interested in building engineering solutions in the areas of Applied Machine Learning, Data mining, Distributed Systems and Distributed Databases.",
"website": "https://www.sandilya.com",
@ssbozy
ssbozy / custom_logger_function.py
Created January 21, 2022 17:10
simple python function to replicate logger module using print
'''
This is to test function calling and name fetching
'''
import inspect
from datetime import datetime
def slogger(mesg: str) -> None:
'''
uses the inspect module to print message with date and caller function
function getRandomColor() {
return {
r: Math.floor(Math.random() *255),
g: Math.floor(Math.random() *255),
b: Math.floor(Math.random() *255)
}
}
function getRandomColor() {
var letters = '0123456789ABCDEF';
var color = '#';
for (var i = 0; i < 6; i++) {
color += letters[Math.floor(Math.random() * 16)];
}
return color;
}