Skip to content

Instantly share code, notes, and snippets.

View OrenBochman's full-sized avatar
🏠
Working from home

Oren Bochman OrenBochman

🏠
Working from home
  • WMF
  • 08:59 (UTC +03:00)
View GitHub Profile

[SQL Fiddle][1]

MySQL 5.6 Schema Setup:

-- schema
CREATE TABLE Client (
    ClientId INT         NOT NULL AUTO_INCREMENT,
    ClientName VARCHAR(35)     NOT NULL,
    Email varchar(100)   NOT NULL,

PhoneNumber VARCHAR(11),

@OrenBochman
OrenBochman / llm-wiki.md
Created April 6, 2026 23:36 — 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.

@OrenBochman
OrenBochman / Search my gists.md
Last active August 28, 2024 21:07 — forked from santisbon/Search my gists.md
How to search gists

Gist Search Cheatsheet

Enter this in the search box along with your search terms:

Get all gists from the user santisbon.
user:orenbochman

Find all gists with a .yml extension.
extension:yml

Thinking Electrons: Modelling People

Thinking electrons: modelling people

| "Imagine how hard physics would be if electrons could think." | --- Murray Gell-Mann (1969 Nobel Laureate in Physics)

People are more complicated than electrons because they tend to consider their self interests before acting. This makes people more difficult to model. Humans are modelled according to three basic frameworks:

  1. rational actor models: These models state that people have goals and optimize their goals.
@OrenBochman
OrenBochman / w05.md
Last active January 27, 2024 12:27
w05

Thinking Electrons: Modelling People

Thinking electrons: modelling people

| "Imagine how hard physics would be if electrons could think." | --- Murray Gell-Mann (1969 Nobel Laureate in Physics)

People are more complicated than electrons because they tend to consider their self interests before acting. This makes people more difficult to model. Humans are modelled according to three basic frameworks:

  1. rational actor models: These models state that people have goals and optimize their goals.
@OrenBochman
OrenBochman / !readme-analytics
Last active January 11, 2024 22:24
get the total edit count of a Mediawiki user
these are some sql queries to do analytics on the mediawiki database.
@OrenBochman
OrenBochman / 0_BQ_description.md
Last active October 25, 2023 15:54
Big Query for GA analytics

BigQuery for Google Analytics

No metrics in

Self Joins

  • Cross Join example
  • Inner Join example

joins can be inefficent - they can require moving lots of data around and increase the data process from n to n * n

@OrenBochman
OrenBochman / 01_enhanced_ecommerce_plugin.js
Last active July 5, 2023 18:39
Enhanced ecommerce snippets in universal analytics
//This command must occur after you create your tracker object and before you use any of the enhanced ecommerce specific functionality.
ga('require', 'ec');
@OrenBochman
OrenBochman / !!intents.md
Last active March 1, 2023 09:12
All about Intents in Android

Intents

Explicit v.s. Implicit

A quick demo of implicit and explicit intents.

Requesting data from another activity

  1. Use startActivityForResult() to start the second Activity
  2. To return data from the second Activity:
@OrenBochman
OrenBochman / 01 Pages.sql
Last active October 5, 2022 07:05
Recreating the google analytics pages report
SELECT
hits.page.pagePath
FROM
'bigquery-public-data.google_analytics_sample.ga_sessions_20160801' AS GA,
UNNEST(GA.hits) AS hits
GROUP BY
hits.page.pagePath