Skip to content

Instantly share code, notes, and snippets.

View ganeshan's full-sized avatar

Ganeshan Venkataraman ganeshan

  • Sterling,MA
View GitHub Profile
import ollama
from pydantic import BaseModel, Field
from typing import Literal, List
# Define a more descriptive JSON structure using Pydantic.
class UserInfo(BaseModel):
name: str = Field(description="The full name of the user who wrote the text.")
sentiment: Literal["positive", "neutral", "negative"] = Field(
description="The overall sentiment of the text."
)
@ganeshan
ganeshan / kilocode-skills-explained.md
Created March 2, 2026 13:46 — forked from markijbema/kilocode-skills-explained.md
How Skills Work in Kilo Code - Complete Technical Explanation
@ganeshan
ganeshan / aks-cheat-sheet.md
Created October 5, 2025 15:35 — forked from yokawasa/aks-cheat-sheet.md
Azure Kubernetes Services Cheat Sheet
@ganeshan
ganeshan / az-cli-commands.txt
Created July 21, 2025 17:55 — forked from vprasadreddy/az-cli-commands.txt
Azure CLI commands cheatsheet to query Azure resources
//AZ CLI query resources
https://techcommunity.microsoft.com/t5/itops-talk-blog/how-to-query-azure-resources-using-the-azure-cli/ba-p/360147
Azure CLI/PowerShell commands
//LOGIN & SUBSCRIPTION
//to login using service principal
az login --service-principal -u {appid} -p {password} --tenant {tenant}
{
"id":"https://schema.management.azure.com/schemas/2018-05-01/policyDefinition.json#",
"$schema":"http://json-schema.org/draft-04/schema#",
"title":"Policy Definition",
"description":"This schema defines Azure resource policy definition, please see https://azure.microsoft.com/en-us/documentation/articles/resource-manager-policy/ for more details.",
"type":"object",
"properties":{
"if":{
"oneOf":[
{
@ganeshan
ganeshan / table_demo.py
Created July 6, 2025 12:49 — forked from Kvit/table_demo.py
Example of Interactive table with FastHTML Datastar and GreatTables
############################################################################################
# REACTIVE TABLE DEMO WITH FASTHTML AND DATASTAR
#
# This example demonstrates:
# 1. Building a reactive data table with real-time filtering and pagination
# 2. Using Datastar for reactive UI updates without page refreshes
# 3. Implementing DaisyUI and TailwindCSS for modern styling
# 4. Handling user interactions with side effects (selection, filtering, pagination)
############################################################################################
@ganeshan
ganeshan / snp500.py
Created April 25, 2025 21:21 — forked from bot-unit/snp500.py
s-and-p-500-companies
import requests
from bs4 import BeautifulSoup
def get_table_from_slickcharts(url: str) -> List[Dict[str, Union[str, float]]]:
# parse table for symbols from slickcharts
headers = {'User-Agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/39.0.2171.95 Safari/537.36'}
response = requests.get(url, headers=headers)
data = []
@ganeshan
ganeshan / OpenSourceBaas.md
Created January 10, 2025 11:40 — forked from PARC6502/OpenSourceBaas.md
List of open source, self hosted BaaS - Backend as a service

Backend as a Service

Supabase - ~52K stars

  • Designed explicitly as an open source firebase alternative
  • Typescript based
  • Docker support

Appwrite - ~32K stars

  • Written in JavaScript and PHP
  • Docker based
  • Realtime support across all services
@ganeshan
ganeshan / lambda_handler.py
Created December 12, 2024 17:25 — forked from djg07/lambda_handler.py
DynamoDB Streams Lambda Handler
import json
print('Loading function')
def lambda_handler(event, context):
print('------------------------')
print(event)
#1. Iterate over each record
try:
for record in event['Records']:
IAM Policy
---
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": [
"rds-db:connect"
],