Skip to content

Instantly share code, notes, and snippets.

View STHITAPRAJNAS's full-sized avatar
💭
I may be slow to respond.

Sthitaprajna Sahoo STHITAPRAJNAS

💭
I may be slow to respond.
View GitHub Profile
<!DOCTYPE html>
<html lang="en" class="scroll-smooth">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Intelligent Address Validation Platform</title>
<script src="https://cdn.tailwindcss.com"></script>
<script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
# --- config.py ---
import os
from pydantic_settings import BaseSettings
from dotenv import load_dotenv
import datetime
load_dotenv()
class Settings(BaseSettings):
"""
@STHITAPRAJNAS
STHITAPRAJNAS / dynamo-langgraph-async.py
Last active April 16, 2025 17:38
dynamodb-langgraph-async
import asyncio
import pickle
import time # Needed for TTL calculation example
from datetime import datetime, timezone, timedelta # Needed for TTL calculation example
from contextlib import asynccontextmanager
from typing import AsyncGenerator, Optional, Sequence, Tuple, Dict, Any, List, Union, TypedDict # Added TypedDict
import aiobotocore.session
from botocore.exceptions import ClientError
from boto3.dynamodb.types import TypeDeserializer, TypeSerializer
# Configuration for evaluating a chatbot endpoint with DeepEval & Bedrock Judge
judge_config:
type: bedrock # Only Bedrock judge supported currently
config:
model_id: "anthropic.claude-3-haiku-20240307-v1:0" # Replace with your judge model ID
# Optional: override default generation params for judge
# max_tokens: 512
# temperature: 0.0
"""
project/
├── state.py # Defines the agent's state
├── prompts.py # Manages prompt templates
├── config.py # Handles configuration and initialization
├── tools.py # Contains utility functions and tools
├── guardrails.py # Implements safety checks
├── nodes.py # Defines workflow nodes for LangGraph
├── workflow.py # Orchestrates the main workflow using LangGraph
@STHITAPRAJNAS
STHITAPRAJNAS / agentic_langgraph_dual_workflow.py
Created February 21, 2025 05:37
A smart langgraph example
import os
from typing import TypedDict, Annotated, Literal, List
from langchain_aws import ChatBedrock
from langchain_community.vectorstores import PGVector
from langchain_core.messages import HumanMessage, AIMessage
from langchain_core.tools import tool
from langgraph.graph import StateGraph, END
from langgraph.checkpoint.memory import MemorySaver
from langchain_openai import OpenAIEmbeddings
import operator
@STHITAPRAJNAS
STHITAPRAJNAS / ML0101EN-Reg-NoneLinearRegression-py-v1.ipynb
Created September 8, 2019 06:29
Created on Cognitive Class Labs
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@STHITAPRAJNAS
STHITAPRAJNAS / ML0101EN-Reg-NoneLinearRegression-py-v1.ipynb
Created September 7, 2019 20:08
Created on Cognitive Class Labs
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.