Skip to content

Instantly share code, notes, and snippets.

View jwiegley's full-sized avatar

John Wiegley jwiegley

View GitHub Profile
Debugger entered--Lisp error: (error "Selecting deleted buffer")
apply(debug (error (error "Selecting deleted buffer")))
transient--exit-and-debug(error (error "Selecting deleted buffer"))
completing-read-default("Model: " (("Ollama:HammerAI/midnight-m..." #s(gptel-ollama :name "Ollama" :host "localhost:11434" :header nil :protocol "http" :stream t :endpoint "/api/chat" :key nil :models ... :url "http://localhost:11434/api..." :request-params ... :curl-args nil) HammerAI/midnight-miqu-70b-v1.5:latest) ("Ollama:codellama:70b" #s(gptel-ollama :name "Ollama" :host "localhost:11434" :header nil :protocol "http" :stream t :endpoint "/api/chat" :key nil :models ... :url "http://localhost:11434/api..." :request-params ... :curl-args nil) codellama:70b) ("Ollama:deepseek-coder:33b" #s(gptel-ollama :name "Ollama" :host "localhost:11434" :header nil :protocol "http" :stream t :endpoint "/api/chat" :key nil :models ... :url "http://localhost:11434/api..." :request-params ... :curl-args nil) deepseek-coder:33b) ("O

Conversation with qwen2.5:32b

# !./.venv/bin/python
# ! /usr/bin/env nix-shell
# ! nix-shell -i python3 -p python3Packages.llama-index -p python3Packages.numpy_2 -p python3Packages.chromadb -p python3Packages.llama-index-vector-stores-chroma -p python3Packages.pypdf -p python3Packages.llama-index-llms-ollama -p python3Packages.llama-index-embeddings-huggingface -p python3Packages.llama-parse -p python3Packages.nltk -p python3Packages.orgparse
# python -m venv .venv
# source .venv/bin/activate
# pip install --upgrade pip
# pip install llama-index "numpy<2" chromadb llama-index-vector-stores-chroma pypdf llama-index-llms-ollama llama-index-embeddings-huggingface nltk orgparse
# python -m venv .venv
# source .venv/bin/activate
# pip install llama-index-llms-ollama
# pip install llama-index-embeddings-huggingface
# pip install llama-index-readers-file
# pip install "numpy<2"
# python starter.py
import sys
import os.path
(defun org-config-show-filetagged-tasks (tag)
"Report items pending review after one second."
(interactive "sTag: ")
(org-ql-search (org-agenda-files)
'(and (todo)
(save-excursion
(goto-char (point-min))
(re-search-forward (concat "#\\+filetags:.*:" tag ":") nil t)))
:sort '(scheduled)))
(length
(org-ql-query
:select '(point)
:from (org-agenda-files)
:where
'(and (todo)
(not (or (ancestors (todo))
(scheduled)
(deadline)
(ts-active)))
TodoITEM_BY_IDLAST_REVIEWNEXT_REVIEWTags
(defun org-extra-get-properties (&rest props)
(cons (org-current-level)
(mapcar #'(lambda (prop)
(if (string= "ITEM_BY_ID" prop)
(format "[[id:%s][%s]]"
(org-entry-get (point) "ID")
(org-entry-get (point) "ITEM"))
(org-entry-get (point) prop)))
props)))
(defvar org-refile-context-file nil)
(defvar org-refile-context-olp nil)
(defun org-refile-context-record (&rest _)
(setq org-refile-context-file
(file-relative-name (buffer-file-name))
org-refile-context-olp
(org-format-outline-path (org-get-outline-path))))
(defun org-refile-context-insert ()