Skip to content

Instantly share code, notes, and snippets.

View cairijun's full-sized avatar

Cai Rijun (Richard) cairijun

  • Tencent
  • Shenzhen, China
View GitHub Profile
@cairijun
cairijun / code_edit.lua
Last active April 5, 2025 16:00
Improved buffer editing tool for CodeCompanion.nvim
local log = require("codecompanion.utils.log")
local M = {
name = "code_edit",
}
M.system_prompt = function()
return [=[
## Code Editing Tool(`code_edit`) - Usages
@cairijun
cairijun / _vq_rewrite.patch
Created March 18, 2014 06:53
vq with BLAS
diff --git a/scipy/cluster/_vq_rewrite.pyx b/scipy/cluster/_vq_rewrite.pyx
index d9fe201..29318af 100644
--- a/scipy/cluster/_vq_rewrite.pyx
+++ b/scipy/cluster/_vq_rewrite.pyx
@@ -9,6 +9,8 @@ Translated to Cython by David Warde-Farley, October 2009.
import numpy as np
cimport numpy as np
+from cpython.mem cimport PyMem_Malloc, PyMem_Free
+from libc.string cimport memset