Skip to content

Instantly share code, notes, and snippets.

View rajivmehtaflex's full-sized avatar
🚀
smile

Rajiv Mehta rajivmehtaflex

🚀
smile
  • Bacancy Technology
  • Ahmedabad
View GitHub Profile
@rajivmehtaflex
rajivmehtaflex / Direct_Package_installation_via_UV.md
Last active July 10, 2026 16:11 — forked from WolframRavenwolf/HOWTO.md
HOWTO: Use Skills, Qwen3-Coder (or any other LLM) with Claude Code (via LiteLLM)

/// script

requires-python = ">=3.10"

dependencies = [

"vllm",

"transformers",

"datasets",

]

///

Your Python code here

@rajivmehtaflex
rajivmehtaflex / UNDERSTANDING_TRANSFORMERS.md.md
Last active July 5, 2026 05:12 — forked from Maharshi-Pandya/contemplative-llms.txt
"Contemplative reasoning" response style for LLMs like Claude and GPT-4o

How LLMs Actually Work: A Plain-English Guide to Transformer Architecture

A from-scratch walkthrough of what happens between typing a prompt and getting a response — no ML background assumed.

What This Guide Covers

Every large language model — GPT-4, Claude, Gemini, Llama — is built on the same core idea. This guide follows that idea in the exact order data actually flows through a real model: text in, tokens, vectors, 80 stacked layers, and a word out — then loops back to explain how the model got trained in the first place. Read it top to bottom; each section is built to need only what came before it.

  1. The One Job an LLM Has
  2. Vectors — Turning Words Into Math
import asyncio
import base64
import json
import os
import pyaudio
from websockets.asyncio.client import connect
class SimpleGeminiVoice:
def __init__(self):
@rajivmehtaflex
rajivmehtaflex / concurrent_task_executor.py
Created March 11, 2024 03:16 — forked from bhimrazy/concurrent_task_executor.py
This Python code defines a function concurrent_task_executor that allows executing tasks concurrently on a list of data objects using ThreadPoolExecutor from the concurrent.futures module. It includes a progress bar using tqdm to track the completion of tasks. The function is useful for processing data in parallel, improving efficiency when deal…
import concurrent.futures
from typing import Any, Callable, List
from tqdm import tqdm
def concurrent_task_executor(task: Callable[[Any], None], data_list: List[Any], max_workers: int = 32, description: str = None) -> None:
"""
Execute tasks concurrently on a list of data objects using ThreadPoolExecutor.
Args:
task (Callable): The function to apply to each data object.
import autogen
config_list = [
{
'model': 'gpt-4',
'api_key': 'API_KEY'
}
]
llm_config={
@rajivmehtaflex
rajivmehtaflex / requirements.txt
Created June 14, 2023 06:47 — forked from claysauruswrecks/requirements.txt
Example using LlamaHub loaders to index Github repos into LlamaIndex and query GPTSimpleVectorIndex with GPT-4
# main
llama-index
langchain
@rajivmehtaflex
rajivmehtaflex / README.md
Created May 8, 2023 10:16 — forked from lxe/README.md
How to get oobabooga/text-generation-webui running on Windows or Linux with LLaMa-30b 4bit mode via GPTQ-for-LLaMa on an RTX 3090 start to finish.

How to get oobabooga/text-generation-webui running on Windows or Linux with LLaMa-30b 4bit mode via GPTQ-for-LLaMa on an RTX 3090 start to finish.

This guide actually works well for linux too. Just don't bother with the powershell envs

  1. Download prerequisites

  2. (Windows Only) Open the Conda Powershell.

@rajivmehtaflex
rajivmehtaflex / GPT4all-langchain-demo.ipynb
Created April 5, 2023 18:04 — forked from psychemedia/GPT4all-langchain-demo.ipynb
Example of running GPT4all local LLM via langchain in a Jupyter notebook (Python)
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@rajivmehtaflex
rajivmehtaflex / csfbc_sqlalchemy.py
Created June 12, 2022 03:51 — forked from kenial/csfbc_sqlalchemy.py
Cheat Sheet For Busy Coders: SQLAlchemy #SQL #mysql
#! /usr/bin/python
# 02/27/2015, Kenial
# Just simple scripts for instant use of SQLAlchemy.
import sqlalchemy as sa
sa.__version__ # '0.9.4' for me
# Sample DB connection string
# engine = sa.create_engine('postgresql://scott:tiger@localhost/mydatabase')
@rajivmehtaflex
rajivmehtaflex / receiver-demo.html
Created July 7, 2020 05:07 — forked from GitSquared/receiver-demo.html
Use your browser to access a remote terminal.
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>Remote terminal</title>
<link rel="stylesheet" href="xterm.css" />
<script src="terminal.class.js"></script>