Skip to content

Instantly share code, notes, and snippets.

View manisnesan's full-sized avatar
🎯
Focusing

Manikandan Sivanesan` manisnesan

🎯
Focusing
View GitHub Profile
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@manisnesan
manisnesan / url2md.ipynb
Last active January 18, 2025 13:03
URL to Markdown conversion with Jina Reader API and Docling
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@manisnesan
manisnesan / deploy-llm-argocd.md
Last active January 6, 2025 17:29
Deploying AI with ArgoCD: From Concept to Reality

AI Prompt:

ArgoCD Overview and Purpose

AI Response:

ArgoCD is an open-source, Kubernetes-native continuous delivery (CD) tool that follows the GitOps principles. Here's a brief overview:

Overview

ArgoCD automates the deployment of applications to Kubernetes clusters by treating the desired application state as code stored in Git repositories. This ensures version control and auditability.

Purpose

@manisnesan
manisnesan / polya.md
Created December 6, 2024 21:24 — forked from jph00/polya.md
Summary of Polya's "How To Solve It With Code"

A guide to George Polya's "How to Solve It"

Introduction

George Polya (1887-1985) was a Hungarian mathematician and educator who revolutionized our understanding of problem-solving and teaching. While he made significant contributions to mathematics, his most enduring legacy is his insights into how people learn and solve problems. His 1945 book "How to Solve It" has influenced educators across numerous fields, extending far beyond mathematics.

Polya's Teaching Philosophy

Polya's approach centered on three key principles. First, he championed active learning, believing students learn best by discovering solutions themselves rather than being told answers. Second, he emphasized heuristic thinking - the art of guided discovery and learning from experience, viewing problem-solving as a skill that can be developed through practice. Third, he developed sophisticated questionin

import requests
UNIFIED_FIELDS = ["title", "text"]
CASE_FIELDS = ["summary", "product", "description"]
SOLUTION_FIELDS = [
"title", "solution_environment", "issue",
"solution_rootcause", "solution_diagnosticsteps",
"solution_resolution"
]
@manisnesan
manisnesan / qna_as_pydantic.ipynb
Last active October 23, 2024 10:20
Qna.yaml as Pydantic Data Model with YAML to Pydantic Conversions This script defines a Pydantic data model for a Q&A system based on a YAML structure. It includes classes for handling questions and answers, document chunks, and overall document metadata. The model supports validation for SHA1 commit hashes.
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.
@manisnesan
manisnesan / 50-rag-mvp.ipynb
Created August 24, 2024 20:28
Ben Clavie - Beyond RAG MVP
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@manisnesan
manisnesan / test_flashrank_bm25_scifact.ipynb
Created August 24, 2024 20:25
Evaluation notebook on scifact dataset using bm25 and flashrank along with examples of ranx and reranker library
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
# Install ujson
from fastcore.utils import dumps
def write_jsonl(cases: list, filename: str)->None:
''' Write a list of dictionaries to a jsonl file. This uses fastcore.utils `dumps` to serialize the dictionary to a string with `ujson` module.
Install `ujson` for faster serialization.'''
with open(filename, 'w') as file:
for item in cases: file.write(dumps(item) + '\n')
def read_jsonl(fname)->list:
''' Read a jsonl file into a list of dictionaries. This uses `ujson` module for faster deserialization. Install `ujson` for faster deserialization.'''