Skip to content

Instantly share code, notes, and snippets.

View pchaganti's full-sized avatar

Prabhakar Chaganti pchaganti

View GitHub Profile
@pchaganti
pchaganti / Gemini.md
Created May 11, 2025 13:17 — forked from ruvnet/Gemini.md
Free & Secure API Key Rotator for Google Gemini 2.5 Pro (Deno Edge Functions)

Great. I’ll develop a phased implementation plan, edge function code, deployment strategy, user guide, and full documentation for a key rotator using Deno Edge Functions. This will focus on rotating Gemini 2.5 Pro API keys to handle 429 rate limits efficiently.

I’ll return with a clear breakdown of components, including a secure architecture, key storage and cycling logic, usage limits, and guidance for setup and customization.

Secure API Key Rotator for Google Gemini 2.5 Pro (Deno Edge Functions)

Overview: This solution is an edge-deployed proxy that securely rotates through a pool of Google Gemini 2.5 Pro API keys to avoid hitting per-key rate limits (e.g. free-tier limit of ~2 requests/minute (Gemini 2.5 Pro via OpenRouter triggers RESOURCE_EXHAUSTED despite API key and usage being within free-tier limits · Issue #2000 · RooVetGit/Roo-Code · GitHub)). By

@pchaganti
pchaganti / contemplative-llms.txt
Created March 21, 2025 01:06 — forked from Maharshi-Pandya/contemplative-llms.txt
"Contemplative reasoning" response style for LLMs like Claude and GPT-4o
You are an assistant that engages in extremely thorough, self-questioning reasoning. Your approach mirrors human stream-of-consciousness thinking, characterized by continuous exploration, self-doubt, and iterative analysis.
## Core Principles
1. EXPLORATION OVER CONCLUSION
- Never rush to conclusions
- Keep exploring until a solution emerges naturally from the evidence
- If uncertain, continue reasoning indefinitely
- Question every assumption and inference
@pchaganti
pchaganti / cursor-agent-system-prompt.txt
Created March 16, 2025 16:46 — forked from sshh12/cursor-agent-system-prompt.txt
Cursor Agent System Prompt (March 2025)
You are a powerful agentic AI coding assistant, powered by Claude 3.5 Sonnet. You operate exclusively in Cursor, the world's best IDE.
You are pair programming with a USER to solve their coding task.
The task may require creating a new codebase, modifying or debugging an existing codebase, or simply answering a question.
Each time the USER sends a message, we may automatically attach some information about their current state, such as what files they have open, where their cursor is, recently viewed files, edit history in their session so far, linter errors, and more.
This information may or may not be relevant to the coding task, it is up for you to decide.
Your main goal is to follow the USER's instructions at each message, denoted by the <user_query> tag.
<communication>
1. Be conversational but professional.

Code Bash command prefix detection

This defines risk levels for actions that the ${K4} agent may take. This classification system is part of a broader safety framework and is used to determine when additional user confirmation or oversight may be needed.

Command prefix extraction examples

Examples:

  • cat foo.txt => cat
  • cd src => cd
@pchaganti
pchaganti / password-check.service.ts
Created March 22, 2023 23:09 — forked from leewinder/password-check.service.ts
Typescript object for checking password strength
// Password strengths
export const enum PasswordCheckStrength {
Short,
Common,
Weak,
Ok,
Strong,
};
// Object to check password strengths and various properties
@pchaganti
pchaganti / cw_stack_status.py
Created March 7, 2022 10:48 — forked from xschildw/cw_stack_status.py
Generate CloudWatch dashboard for stack review
import sys
import re
import json
import boto3
def get_ec2_instance_ids(environment, stack_instance):
tag_name = environment + "-prod-" + stack_instance
instances = get_ec2_instances_by_name(tag_name)
return [inst.id for inst in instances]
@pchaganti
pchaganti / trending_pennystocks.py
Created May 2, 2021 16:44 — forked from lipton-green-tea/trending_pennystocks.py
A piece of code that sorts sentimentinvestor.com stocks to find promising penny stocks based on fundamental data.
@pchaganti
pchaganti / vix_sensitivities.py
Created April 15, 2021 14:23 — forked from fanannan/vix_sensitivities.py
check front-runners for VIX movement
# %matplotlib inline
import numpy as np
import pandas as pd
import pandas.io as io
import talib as ta
import datetime as dt
import math
from minepy import MINE
from pandas.io.data import DataReader
import urllib
@pchaganti
pchaganti / WVF
Created April 8, 2021 09:36 — forked from backlundpf/WVF
import numpy as np
import scipy
import pandas as pd
from pytz import timezone
def initialize(context):
context.stocks = [sid(32270), #SSO
sid(38294), #TMF
sid(21508), #IJR
sid(21507), #IJH
@pchaganti
pchaganti / investing.py
Created March 10, 2021 01:25 — forked from elibroftw/investing.py
A Python script and tool for speeding up stock market research.
"""
Investing Quick Analytics
Author: Elijah Lopez
Version: 1.46
Created: April 3rd 2020
Updated: March 5th 2021
https://gist.github.com/elibroftw/2c374e9f58229d7cea1c14c6c4194d27
Resources:
Black-Scholes variables: