Skip to content

Instantly share code, notes, and snippets.

View anshajk's full-sized avatar
🎯
Focusing

Anshaj anshajk

🎯
Focusing
View GitHub Profile
@anshajk
anshajk / server.py
Created October 12, 2025 08:46
Basic MCP math server with addition, multiplication, and compound interest tools.
# server.py
from fastmcp import FastMCP
# Create an MCP server
mcp = FastMCP("Basic math server")
# Add an addition tool
@mcp.tool()
def add(a: int, b: int) -> int:
@anshajk
anshajk / server.py
Created September 20, 2025 17:31
Basic MCP math server with addition, multiplication, and compound interest tools.
# server.py
from fastmcp import FastMCP
# Create an MCP server
mcp = FastMCP("Basic math server")
# Add an addition tool
@mcp.tool()
def add(a: int, b: int) -> int:
@anshajk
anshajk / server.py
Created September 16, 2025 11:57
Basic MCP math server with addition, multiplication, and compound interest tools.
# server.py
from fastmcp import FastMCP
# Create an MCP server
mcp = FastMCP("Basic math server")
# Add an addition tool
@mcp.tool()
def add(a: int, b: int) -> int:
# Complete AI Agent Deployment Manifests
# 1. Namespace for organization
apiVersion: v1
kind: Namespace
metadata:
name: ai-agent
---
# 2. ConfigMap for application configuration
from fastapi import FastAPI
app = FastAPI()
@app.get("/")
def read_root():
return {"message": "Hello, FastAPI!"}
@anshajk
anshajk / clockify_report.py
Created January 7, 2022 12:59
Clockify Weekly Report REST API abstraction in python
import datetime as dt
import json
import logging
import os
from typing import Dict, Tuple
import requests
BASE_API = "https://reports.api.clockify.me/v1"
PREP_PROJECT_ID = "<can-enter-it-here>"
@anshajk
anshajk / interviewbit_scraper.py
Created November 4, 2021 08:08
Interview Bit questions list along with their scores
import bs4
import requests
import pandas as pd
list_of_ib_urls = [
"https://www.interviewbit.com/courses/programming/topics/arrays/",
"https://www.interviewbit.com/courses/programming/topics/math/",
"https://www.interviewbit.com/courses/programming/topics/binary-search/",
"https://www.interviewbit.com/courses/programming/topics/strings/",
"https://www.interviewbit.com/courses/programming/topics/bit-manipulation/",
@anshajk
anshajk / main.go
Created February 3, 2021 17:14
Interface example in golang
//A very simple example of an interface in golang
package main
import "fmt"
type apple struct {
calories int
}
type orange struct {
@anshajk
anshajk / cd.yaml
Created January 24, 2021 16:00
Continuous deployment using GitHub Actions for Firebase Remote Config
name: remote-config-deployer
on: [push]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python
@anshajk
anshajk / CloudFormationTemplate.yml
Created December 13, 2020 13:46
Example cloud formation templates
AWSTemplateFormatVersion: 2010-09-09
Description: Template to create an EC2 instance and enable SSH
Parameters:
KeyName:
Description: Name of SSH KeyPair
Type: 'AWS::EC2::KeyPair::KeyName'
ConstraintDescription: Provide the name of an existing SSH key pair