Skip to content

Instantly share code, notes, and snippets.

View cagbal's full-sized avatar
:atom:
Hacking

cagatay odabasi cagbal

:atom:
Hacking
View GitHub Profile
@cagbal
cagbal / llm-wiki.md
Created April 5, 2026 22:39 — forked from karpathy/llm-wiki.md
llm-wiki

LLM Wiki

A pattern for building personal knowledge bases using LLMs.

This is an idea file, it is designed to be copy pasted to your own LLM Agent (e.g. OpenAI Codex, Claude Code, OpenCode / Pi, or etc.). Its goal is to communicate the high level idea, but your agent will build out the specifics in collaboration with you.

The core idea

Most people's experience with LLMs and documents looks like RAG: you upload a collection of files, the LLM retrieves relevant chunks at query time, and generates an answer. This works, but the LLM is rediscovering knowledge from scratch on every question. There's no accumulation. Ask a subtle question that requires synthesizing five documents, and the LLM has to find and piece together the relevant fragments every time. Nothing is built up. NotebookLM, ChatGPT file uploads, and most RAG systems work this way.

#!/bin/bash
# This file will be sourced in init.sh
# https://raw.githubusercontent.com/ai-dock/comfyui/main/config/provisioning/default.sh
# Packages are installed after nodes so we can fix them...
PYTHON_PACKAGES=(
"onnxruntime-gpu"
@cagbal
cagbal / stable-diffusion-webui-termux.md
Last active March 5, 2024 21:55 — forked from nviet/stable-diffusion-webui-termux.md
Install stable-diffusion-webui on Termux (Android) + PRoot

Install stable-diffusion-webui on Termux (Android) + PRoot

This will guide you on installing AUTOMATIC1111/stable-diffusion-webui on Termux (Android) + PRoot Distro. Make sure that you have a high-end phone to actually make this usable. On my phone with 8GB RAM, launch the webui alone take at least ~ 2 GB RAM, thus making it impossible to load any model and process further.

1. Prerequisites

First you have to install Termux from F-Droid, Termux from Play store won't work and install PRoot.

Then install and login to Ubuntu in PRoot

@cagbal
cagbal / client.py
Created April 1, 2021 14:33 — forked from ilomon10/client.py
Send image as base64 buffer from client (python opencv) to server (nodejs) using SocketIO
import cv2
import socketio #python-socketio by @miguelgrinberg
import base64
sio = socketio.Client()
sio.connect('http://x.x.x.x:xxxx)
cam = cv2.VideoCapture(0)
while (True):
@cagbal
cagbal / KINETICS_LABELS.md
Created August 16, 2020 20:01 — forked from willprice/KINETICS_LABELS.md
Kinetics Dataset Labels (name to ID)

Kinetics Numeric/String labels

These are mapping files that go between class IDs to class names. These are generated from the training CSV files from each dataset by collecting the unique classes, sorting them, and then numbering them from 0 upwards.

@cagbal
cagbal / KINETICS_LABELS.md
Created August 16, 2020 20:01 — forked from willprice/KINETICS_LABELS.md
Kinetics Dataset Labels (name to ID)

Kinetics Numeric/String labels

These are mapping files that go between class IDs to class names. These are generated from the training CSV files from each dataset by collecting the unique classes, sorting them, and then numbering them from 0 upwards.

#include <iostream>
#include <vector>
#include <chrono>
using namespace std;
int main()
{
// 2 Boş vektör oluşturalım
vector<pair<int, int>> cok_buyuk_vector_arka,
@cagbal
cagbal / push_backvsemplace_back.cpp
Created March 24, 2019 20:19
push back vs emplace back arasındaki fark
#include <iostream>
#include <vector>
#include <chrono>
using namespace std;
int main()
{
// 2 Boş vektör oluşturalım
vector<pair<int, int>> cok_buyuk_vector_arka,
@cagbal
cagbal / push_backvspush_front.cpp
Created March 24, 2019 19:47
push_back vs push_front
#include <iostream>
#include <vector>
#include <chrono>
#include <string>
using namespace std;
int main()
{
// 2 Boş vektör oluşturalım
!pip install opencv-python
!wget https://images.pexels.com/photos/860562/pexels-photo-860562.jpeg
import cv2
import numpy as np
import PIL
from IPython.display import display