Skip to content

Instantly share code, notes, and snippets.

View githubdebugger's full-sized avatar

githubdebugger

View GitHub Profile
- After making changes, ALWAYS make sure to start up a new server so I can test it.
- Always look for existing code to iterate on instead of creating new code.
- Do not drastically change the patterns before trying to iterate on existing patterns.
- Always kill all existing related servers that may have been created in previous testing before trying to start a new server.
- Always prefer simple solutions
- Avoid duplication of code whenever possible, which means checking for other areas of the codebase that might already have similar code and functionality
- Write code that takes into account the different environments: dev, test, and prod
- You are careful to only make changes that are requested or you are confident are well understood and related to the change being requested
- When fixing an issue or bug, do not introduce a new pattern or technology without first exhausting all options for the existing implementation. And if you finally do this, make sure to remove the old implementation afterwards so we d
@githubdebugger
githubdebugger / contemplative-llms.txt
Created January 8, 2025 08:53 — 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
@githubdebugger
githubdebugger / clickhouse_install.sh
Last active September 10, 2024 06:41
clickhouse_install.sh
#!/bin/bash
# Function to prompt user for yes/no input
ask_yes_no() {
while true; do
read -p "$1 (y/n): " yn
case $yn in
[Yy]* ) return 0;;
[Nn]* ) return 1;;
* ) echo "Please answer yes or no.";;
@githubdebugger
githubdebugger / fetch_and_parse_json
Created September 2, 2024 14:56
fetch_and_parse_json
async fn fetch_and_parse_json(
client: &Client,
api_key: &str,
access_token: &str,
symbols: &[&str],
) -> Result<Option<DataFrame>> {
let url = "https://api.kite.trade/quote";
let start = Instant::now();
@githubdebugger
githubdebugger / quote_to_polars_df
Last active September 2, 2024 14:49
quote_to_polars_df
use serde::Deserialize;
#[derive(Deserialize)]
pub struct QuoteResponse {
pub status: String,
pub data: std::collections::HashMap<String, Quote>,
}
#[derive(Deserialize)]
pub struct Quote {
@githubdebugger
githubdebugger / cursor.sh
Created August 25, 2024 18:58
cursor.sh
#!/usr/bin/bash
# Check if the "--clean" or "--install" argument is provided
if [ "$1" == "--clean" ]; then
# Clean installation
echo "Deleting Cursor files..."
if [ -d ~/.cursor ] || [ -d ~/.config/Cursor ] || [ -d ~/.cache/cursor-updater ]; then
rm -rf ~/.cursor
rm -rf ~/.config/Cursor
rm -rf ~/.cache/cursor-updater
@githubdebugger
githubdebugger / dhan_secid.py
Created July 29, 2024 15:57
Cross compatible Security ID for retrieving Security ID of dhan for a given strike to place Orders
#This is a Runtime script and not efficient, Effecient way is to preprocess before market hours and save everything for quick retrieval
import requests
import polars as pl
from datetime import datetime
import io
#Give Shoonya Symbol name and get dhan Security ID for Placing orders
def get_security_id_dhan(search_value):
url = 'https://images.dhan.co/api-data/api-scrip-master.csv'
response = requests.get(url)