Skip to content

Instantly share code, notes, and snippets.

View berkorbay's full-sized avatar
🤖
talk to my agent (kidding)

Berk Orbay berkorbay

🤖
talk to my agent (kidding)
  • Tideseed
  • Istanbul, Turkey
  • 18:07 (UTC +03:00)
View GitHub Profile
@berkorbay
berkorbay / cuopt-energy-lp-findings.md
Created November 14, 2026 19:44
cuOpt 26.10 on the Open Energy Benchmark LPs: "optimal" is not always exact — and an open fix (pilot findings, 2026-11-14)

cuOpt 26.10 on the Open Energy Benchmark LPs: "optimal" is not always exact — and an open fix

2026-11-14. Author: Berk Orbay. Measurements and text prepared with Claude Code (Anthropic); the text was refereed by Claude Fable (Anthropic) against the measurement records. Pilot-scale findings, not a benchmark: one machine, one run per cell, a partial problem set.

What we did

We ran NVIDIA cuOpt 26.10 on the linear and mixed-integer problems of the Open Energy Benchmark (Open Energy Transition; instances CC BY 4.0) with the benchmark's published tolerance, gap and seed settings (absolute and relative tolerances 1e-6, which cuOpt applies to L2 residuals; crossover off; otherwise cuOpt's defaults, i.e. concurrent mode on all CPU threads), on one NVIDIA DGX Spark class machine (GB10 GPU, 20 Arm cores). We did not re-run the other

@berkorbay
berkorbay / gist-qwen38-dgx-spark.md
Last active November 28, 2026 17:26
Running Qwen3.8-27B on a single NVIDIA DGX Spark (GB10) for agentic coding — llama.cpp tuning, SGLang head-to-head, and GB10 gotchas. By Claude Code. Corrections welcome.

Local LLM agents on one NVIDIA DGX Spark (GB10): since 2026-11-02 one Qwen3.8-Flash-Next FP4 on TensorFold serves both the deep and the fast tier (before: Qwen3.8-27B + a small-active MoE). Settings that matter, GB10 compatibility facts, measured results and traps. Written for agents and operators. By Claude Code. Corrections welcome.

Local LLM agents on one DGX Spark (GB10) — reference

What this is. A compact, verified reference for serving local LLMs to agents (long tool-using runs, 16k–100k+ contexts, one request at a time) on a single DGX Spark. Every number states its conditions. Dated findings are posted as comments on this gist ("Journal — date · topic"); settled facts are folded into this body. The previous long-form edition (full histories, older tables, harness post-mortems) is revision f0b092e of this gist.

Box. NVIDIA DGX Spark, GB10, arm64, compute capability sm_121, 128 GB unified memory (GPU allocations are

@berkorbay
berkorbay / instructions.md
Created December 11, 2025 16:12
An example mcp.json file to have the eptr2 MCP server recognized.

VS Code

You need Github Copilot and VS Code for this method

  • Clone the eptr2 repository from Github to a local folder. Say git_repos/eptr2
  • Then get the absolute path of the folder, copy paste mcp.json to your project's .vscode/mcp.json, replace eptr2_REPOSITORY_PATH with that absolute path.
  • Click on the little start button that appears on the mcp.json.
@berkorbay
berkorbay / redis_tahta.py
Created November 18, 2025 14:18
gip2logger Örnekleri
from redis import Redis
from dotenv import load_dotenv
import os
### .env dosyasına Redis bağlantı bilgilerini ekleyebilirsiniz.
load_dotenv()
## Redis bağlantısı kurun
r = Redis(
host=os.getenv("REDIS_HOST"),
@berkorbay
berkorbay / fiyat_maliyet_2026.py
Last active November 2, 2026 13:42
eptr2 Örnekleri
## Fiyat ve maliyet bilgisi alırken 2026 tahmini maliyetlerini de alma opsiyonu
## Bu opsiyon v1.3.2.dev0'dan itibaren geçerlidir ve 2026 yılı içerisinde değiştirilecektir
from eptr2 import EPTR2
eptr = EPTR2(recycle_tgt=True)
df = get_hourly_price_and_cost_data(
eptr=eptr,
start_date="2025-11-01",
@berkorbay
berkorbay / eptr2_mcp.py
Created July 16, 2025 13:43
EPTR2 MCP Server v0
from typing import Any
import httpx
from mcp.server.fastmcp import FastMCP
from eptr2.main import eptr_w_tgt_wrapper, EPTR2
import pandas as pd
# Initialize FastMCP server
mcp = FastMCP("eptr2")
eptr = eptr_w_tgt_wrapper()
@berkorbay
berkorbay / eptr2_cost_calc.py
Created February 25, 2025 18:26
Imbalance and KUPST costs using EPTR2
from eptr2.util.costs import calculate_diff_cost
res = calculate_diff_cost(
actual=50, forecast=100, mcp=1000.0, smp=2500.0, prod_source="solar"
)
## print(res)
# {
# "imbalances": {
# "diff": -50,
@berkorbay
berkorbay / eptr2.R
Created May 1, 2024 09:50
eptr2 Python paketini R ile kullanmak
library(tidyverse)
library(reticulate)
if(FALSE){
print("Installing python packages")
reticulate::py_install("eptr2")
reticulate::py_install("pandas")
reticulate::py_install("urllib3")
}
eptr2 <- reticulate::import("eptr2")
eptr_obj <- eptr2$EPTR2()
@berkorbay
berkorbay / gip_3.py
Created January 4, 2024 13:13
İlk 3 Gün GİP Hacimleri Karşılaştırması
## GİP Hacim Karşılaştırma
from eptr2 import EPTR2
import re
import pandas as pd
eptr = EPTR2()
idm_qty_24 = eptr.call("idm-qty", start_date="2024-01-01", end_date="2024-01-03")
idm_qty_23 = eptr.call("idm-qty", start_date="2023-01-01", end_date="2023-01-03")
idm_vol_24 = eptr.call("idm-volume", start_date="2024-01-01", end_date="2024-01-03")
@berkorbay
berkorbay / launch.json
Created November 20, 2023 15:03
Streamlit debug config for VS Code
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "Streamlit: App",
"type": "python",
"request": "launch",