Skip to content

Instantly share code, notes, and snippets.

View rajtilakjee's full-sized avatar
:octocat:
Imagineering!

Rajtilak Bhattacharjee rajtilakjee

:octocat:
Imagineering!
View GitHub Profile
@rajtilakjee
rajtilakjee / contemplative-llms.txt
Created January 8, 2025 03:57 — 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
@rajtilakjee
rajtilakjee / std.md
Created December 11, 2024 13:41 — forked from tonibardina/std.md
Git Commit Message Standard

Merged from https://github.com/joelparkerhenderson/git_commit_message and https://chris.beams.io/posts/git-commit/

General Rules

  • Commit messages must have a subject line and may have body copy. These must be separated by a blank line.
  • The subject line must not exceed 50 characters
  • The subject line should be capitalized and must not end in a period
  • The subject line must be written in imperative mood (Fix, not Fixed / Fixes etc.)
  • The body copy must be wrapped at 72 columns
  • The body copy must only contain explanations as to what and why, never how. The latter belongs in documentation and implementation.
@rajtilakjee
rajtilakjee / set_refresh_rate.py
Created December 8, 2024 07:41
Python script to change the display's refresh rate to 60 Hz for Windows 11 PC
import ctypes
from ctypes import wintypes
# Constants
CDS_UPDATEREGISTRY = 0x01
DISP_CHANGE_SUCCESSFUL = 0
ENUM_CURRENT_SETTINGS = -1
class POINTL(ctypes.Structure):
_fields_ = [("x", wintypes.LONG), ("y", wintypes.LONG)]
@rajtilakjee
rajtilakjee / redditmodmailbot.py
Created June 26, 2023 05:24
Reddit Modmail Bot
import praw
import discord
import os
from dotenv import load_dotenv
load_dotenv()
reddit = praw.Reddit(
client_id=os.getenv('API_CLIENT'),
client_secret=os.getenv('API_SECRET'),
@rajtilakjee
rajtilakjee / redditstreakbot.py
Created June 26, 2023 05:23
Reddit Streak Bot
import praw
import os
import requests
import pandas as pd
from dotenv import load_dotenv
load_dotenv()
reddit = praw.Reddit(
@rajtilakjee
rajtilakjee / redditmusicbot.py
Created June 26, 2023 05:22
Reddit Music Bot
import json
import urllib.request
import re
import urllib
import praw
import os
from dotenv import load_dotenv
load_dotenv()
@rajtilakjee
rajtilakjee / redditflairbot.py
Created June 26, 2023 05:21
Reddit Flair Bot
import praw
import os
from dotenv import load_dotenv
load_dotenv()
reddit = praw.Reddit(
client_id=os.getenv('API_CLIENT'),
client_secret=os.getenv('API_SECRET'),
password=os.getenv('REDDIT_PASSWORD'),
@rajtilakjee
rajtilakjee / youtubetranscriber.py
Created June 26, 2023 05:00
YouTube Transcriber
import whisper
import pytube
import requests
def whisperMagic(url):
r = requests.get(url)
status = "Video unavailable" in r.text
if status == False:
data = pytube.YouTube(url)
audio = data.streams.get_audio_only()
@rajtilakjee
rajtilakjee / paywall-replacer.js
Last active June 1, 2023 16:12
Chrome extension to replace paywall
// Get the current page URL
var currentURL = window.location.href;
// Replace the protocol with 'https://12ft.io/'
var modifiedURL = currentURL.replace(/^https?:\/\//i, 'https://12ft.io/');
// Create a new <a> element
var link = document.createElement('a');
// Set the href attribute of the <a> element to the modified URL
@rajtilakjee
rajtilakjee / answer-over-docs.py
Created April 10, 2023 14:13
Getting started with questions and answer over docs
from langchain import OpenAI
from langchain.chains import RetrievalQA
from langchain.embeddings.openai import OpenAIEmbeddings
from langchain.text_splitter import RecursiveCharacterTextSplitter
from langchain.vectorstores import Chroma
from langchain.document_loaders import TextLoader
import os
os.environ["OPENAI_API_KEY"] = ''
vectordb_directory = 'db'