gitnexus-codebase-intelligence — independently scanned and version-tracked by SaferSkills.
SaferSkills independently audited gitnexus-codebase-intelligence (Agent Skill) and scored it 100/100 (green). The audit ran 55 deterministic rules across Security, Supply Chain, Maintenance, Transparency, and Community; it found 0 high-severity and 0 lower-severity findings. The full rule-by-rule trace and per-finding evidence are below. Free, methodology-open.
Findings & checks · 0 flagged
Every scanned point with the score it earned and what moved between them.
First recorded scan — no prior version to compare against.
The primary manifest — the file an agent reads to learn what this artifact does.
USE FOR:
tags: [MCP, codebase, knowledge-graph, Tree-sitter, symbol-search, impact-analysis, Claude-Code, Cursor, Cypher] kind: tool category: pro-code-architecture
Codebase intelligence platform — transforms repos into knowledge graphs for AI agents.
"Building a nervous system for agent context"
Traditional AI assistants don't know when edits break downstream dependencies. GitNexus precomputes architectural intelligence at index time → fast, accurate impact analysis at query time.
| Tool | What It Does |
|---|---|
symbol_search | BM25 + semantic hybrid search across codebase |
symbol_context | 360° view: incoming + outgoing relationships for any symbol |
impact_radius | All code that depends on a given symbol |
git_diff_impact | Map git diff → which symbols are affected + their dependents |
multi_file_rename | Coordinated safe rename across all references |
graph_query | Raw Cypher queries on the knowledge graph |
discover_symbols | List all symbols by type (functions, classes, methods) |
1. Structural mapping → directory tree, file relationships
2. AST parsing → Tree-sitter extracts symbols per language
3. Import/call resolve → link usages to definitions
4. Community cluster → group related modules
5. Execution flow trace → call chains, data flow paths
6. Hybrid search index → BM25 + vector embeddings# Index a repository
npx gitnexus analyze
# Configure MCP for your editor (one-time, multi-project)
npx gitnexus setup
# → adds GitNexus MCP server to Claude Code / Cursor / Windsurf configWeb UI (no install):
https://gitnexus.vercel.app
# Upload or link repo → explore in browserAfter npx gitnexus setup, Claude Code gets access to all 7 MCP tools:
# In Claude Code session:
> "What calls the processOrder function?"
→ Claude uses symbol_context MCP tool → instant impact map
> "I'm about to rename UserService — what breaks?"
→ Claude uses impact_radius → lists all 47 dependent symbols
> "Show me what this git diff affects"
→ Claude uses git_diff_impact → maps changed lines to affected call chains| Language | Imports | Types | Frameworks |
|---|---|---|---|
| TypeScript / JS | ✓ | ✓ | React, Next.js |
| Python | ✓ | ✓ | Django, FastAPI |
| Java | ✓ | ✓ | Spring |
| Go | ✓ | ✓ | — |
| Rust | ✓ | ✓ | — |
| C# | ✓ | ✓ | .NET |
| PHP | ✓ | — | Laravel |
| + 6 more | varies | varies | — |
-- Raw Cypher query via graph_query tool
MATCH (s:Symbol {name: "UserService"})<-[:CALLS|IMPORTS*1..3]-(dep:Symbol)
RETURN dep.name, dep.file, dep.line
ORDER BY dep.fileReturns every symbol within 3 hops that depends on UserService.
name: opencv description: > OpenCV - Open Source Computer Vision Library. 86k stars, 14 modules. imgproc (filtering/contours/warp), dnn (YOLO/ONNX inference), features2d (SIFT/ORB/AKAZE matching), objdetect (Haar/HOG/QR), calib3d, tracking (KCF/CSRT). pip install opencv-contrib-python. C++ and Python. USE FOR:
tags: [OpenCV, computer-vision, image-processing, DNN, YOLO, SIFT, ORB, contours, tracking, Python, C++] kind: library category: programmatic-drawing
Open Source Computer Vision Library.
pip install opencv-contrib-python # recommended (includes SIFT, tracking)
pip install opencv-contrib-python-headless # no GUI (servers)import cv2
print(cv2.__version__) # e.g. 4.9.0| Module | Key Functions |
|---|---|
| core | Mat, imread, imwrite, cvtColor |
| imgproc | GaussianBlur, Canny, threshold, findContours, warpPerspective |
| features2d | SIFT, ORB, AKAZE, BFMatcher, FLANN |
| objdetect | CascadeClassifier, QRCodeDetector |
| dnn | readNetFromONNX, blobFromImage, forward |
| video | BackgroundSubtractor, calcOpticalFlow |
| calib3d | calibrateCamera, undistort, findHomography |
| tracking | TrackerKCF, TrackerCSRT, TrackerMOSSE |
| ml | SVM, KMeans |
| photo | inpaint, fastNlMeansDenoising |
import cv2, numpy as np
img = cv2.imread("image.jpg") # BGR uint8
gray = cv2.cvtColor(img, cv2.COLOR_BGR2GRAY)
hsv = cv2.cvtColor(img, cv2.COLOR_BGR2HSV)
rgb = cv2.cvtColor(img, cv2.COLOR_BGR2RGB) # for matplotlib
h, w, c = img.shape
roi = img[y1:y2, x1:x2] # crop
cv2.imwrite("out.jpg", img)
cv2.imshow("win", img); cv2.waitKey(0)blur = cv2.GaussianBlur(gray, (5,5), 0)
median = cv2.medianBlur(gray, 5) # salt-and-pepper
bilat = cv2.bilateralFilter(img, 9, 75, 75) # edge-preserving
edges = cv2.Canny(blur, 50, 150)
kernel = cv2.getStructuringElement(cv2.MORPH_ELLIPSE, (5,5))
opened = cv2.morphologyEx(binary, cv2.MORPH_OPEN, kernel) # remove noise
closed = cv2.morphologyEx(binary, cv2.MORPH_CLOSE, kernel) # fill holes_, binary = cv2.threshold(gray, 127, 255, cv2.THRESH_BINARY)
_, otsu = cv2.threshold(gray, 0, 255, cv2.THRESH_BINARY + cv2.THRESH_OTSU)
adaptive = cv2.adaptiveThreshold(gray, 255,
cv2.ADAPTIVE_THRESH_GAUSSIAN_C, cv2.THRESH_BINARY, 11, 2)
# Color range mask
lower = np.array([100, 50, 50])
upper = np.array([130, 255, 255])
mask = cv2.inRange(hsv, lower, upper)cnts, hier = cv2.findContours(binary, cv2.RETR_TREE, cv2.CHAIN_APPROX_SIMPLE)
for cnt in cnts:
area = cv2.contourArea(cnt)
if area < 500: continue
peri = cv2.arcLength(cnt, True)
approx = cv2.approxPolyDP(cnt, 0.02*peri, True)
x,y,w,h = cv2.boundingRect(cnt)
M = cv2.moments(cnt)
cx = int(M["m10"] / M["m00"]) # centroid
cy = int(M["m01"] / M["m00"])
cv2.drawContours(img, [cnt], 0, (0,255,0), 2)
# Shape by vertex count
n = len(approx)
if n == 3: shape = "triangle"
elif n == 4: shape = "quad/rect"
elif n == 5: shape = "pentagon"
else: shape = "circle"src = np.float32([[tl_x,tl_y],[tr_x,tr_y],[bl_x,bl_y],[br_x,br_y]])
dst = np.float32([[0,0],[W,0],[0,H],[W,H]])
M = cv2.getPerspectiveTransform(src, dst)
warped = cv2.warpPerspective(img, M, (W, H))sift = cv2.SIFT_create()
orb = cv2.ORB_create(nfeatures=1500)
kp1, des1 = sift.detectAndCompute(img1, None)
kp2, des2 = sift.detectAndCompute(img2, None)
bf = cv2.BFMatcher(cv2.NORM_L2) # L2 for SIFT
# bf = cv2.BFMatcher(cv2.NORM_HAMMING) # Hamming for ORB/AKAZE
matches = bf.knnMatch(des1, des2, k=2)
good = [m for m,n in matches if m.distance < 0.75*n.distance]
if len(good) > 10:
src_pts = np.float32([kp1[m.queryIdx].pt for m in good]).reshape(-1,1,2)
dst_pts = np.float32([kp2[m.trainIdx].pt for m in good]).reshape(-1,1,2)
H, mask = cv2.findHomography(src_pts, dst_pts, cv2.RANSAC, 5.0)| Detector | Speed | Scale inv | Notes |
|---|---|---|---|
| SIFT | Slow | Yes | Most accurate |
| ORB | Fast | No | Free, real-time |
| AKAZE | Medium | Yes | Balanced |
| FAST | Very fast | No | Corners only |
face_cascade = cv2.CascadeClassifier(
cv2.data.haarcascades + "haarcascade_frontalface_alt.xml")
faces = face_cascade.detectMultiScale(gray, 1.1, 5, minSize=(30,30))
for (x,y,w,h) in faces:
cv2.rectangle(img, (x,y), (x+w,y+h), (255,0,0), 2)
qr = cv2.QRCodeDetector()
data, pts, _ = qr.detectAndDecode(img)net = cv2.dnn.readNetFromONNX("yolov8n.onnx")
# Optional GPU: net.setPreferableBackend(cv2.dnn.DNN_BACKEND_CUDA)
blob = cv2.dnn.blobFromImage(img, 1/255, (640,640), swapRB=True)
net.setInput(blob)
outputs = net.forward(net.getUnconnectedOutLayersNames())
for det in outputs[0]:
scores = det[5:]
class_id = np.argmax(scores)
confidence = scores[class_id]
if confidence > 0.5:
cx,cy,bw,bh = (det[:4] * np.array([W,H,W,H])).astype(int)
cv2.rectangle(img, (cx-bw//2, cy-bh//2), (cx+bw//2, cy+bh//2), (0,255,0), 2)Supported: ONNX | TensorFlow .pb | Caffe | Darknet YOLO | OpenVINO IR
tracker = cv2.TrackerCSRT_create() # best accuracy
# tracker = cv2.TrackerKCF_create() # balanced
# tracker = cv2.TrackerMOSSE_create() # fastest
ok = tracker.init(frame, (x, y, w, h))
while cap.isOpened():
ok, frame = cap.read()
ok, bbox = tracker.update(frame)
if ok:
x,y,w,h = [int(v) for v in bbox]
cv2.rectangle(frame, (x,y), (x+w,y+h), (0,255,0), 2)objp = np.zeros((6*9,3), np.float32)
objp[:,:2] = np.mgrid[0:9,0:6].T.reshape(-1,2)
objpts, imgpts = [], []
for img in calib_images:
gray = cv2.cvtColor(img, cv2.COLOR_BGR2GRAY)
ret, corners = cv2.findChessboardCorners(gray, (9,6))
if ret:
objpts.append(objp)
imgpts.append(cv2.cornerSubPix(gray, corners, (11,11), (-1,-1),
(cv2.TERM_CRITERIA_EPS + cv2.TERM_CRITERIA_MAX_ITER, 30, 0.001)))
ret, mtx, dist, rvecs, tvecs = cv2.calibrateCamera(objpts, imgpts, gray.shape[::-1], None, None)
undist = cv2.undistort(frame, mtx, dist)# Background subtraction
fgbg = cv2.createBackgroundSubtractorMOG2(history=500, detectShadows=True)
fgmask = fgbg.apply(frame)
# Sparse optical flow (Lucas-Kanade)
p0 = cv2.goodFeaturesToTrack(prev_gray, 100, 0.3, 7)
p1, st, _ = cv2.calcOpticalFlowPyrLK(prev_gray, gray, p0, None)
good_new = p1[st==1]
# Dense optical flow
flow = cv2.calcOpticalFlowFarneback(prev_gray, gray, None, 0.5, 3, 15, 3, 5, 1.2, 0)
mag, ang = cv2.cartToPolar(flow[...,0], flow[...,1])cv2.line(img, (x1,y1), (x2,y2), (B,G,R), thickness)
cv2.rectangle(img, (x1,y1), (x2,y2), color, thickness) # -1 = filled
cv2.circle(img, (cx,cy), radius, color, thickness)
cv2.putText(img, "text", (x,y), cv2.FONT_HERSHEY_SIMPLEX, scale, color, thickness)
cv2.polylines(img, [pts], isClosed=True, color, thickness)
cv2.arrowedLine(img, pt1, pt2, color, thickness)# Used in chess/ desktop app (board_detector.py)
gray = cv2.cvtColor(screen, cv2.COLOR_BGR2GRAY)
blur = cv2.GaussianBlur(gray, (5,5), 0)
edges = cv2.Canny(blur, 50, 150)
cnts, _ = cv2.findContours(edges, cv2.RETR_EXTERNAL, cv2.CHAIN_APPROX_SIMPLE)
board = max(cnts, key=cv2.contourArea) # largest contour = board
approx = cv2.approxPolyDP(board, 0.02*cv2.arcLength(board,True), True)
# approx should have 4 points for the board corners
warped = cv2.warpPerspective(screen, M, (512, 512))
# Then split warped into 8x8 grid -> classify each squarename: orange3-data-mining description: > Orange3 - open-source visual data mining and ML platform by Univ. of Ljubljana. No-code canvas-based workflow: connect widgets for data loading, preprocessing, visualization, classification, clustering, regression. Add-ons: text, time series, bioinformatics, image analytics, geo. pip/conda/winget install. USE FOR:
tags: [Orange3, visual-ML, data-mining, no-code, clustering, classification, regression] kind: tool category: pro-code-architecture
Visual data mining and ML toolbox — no programming required.
winget install --id UniversityofLjubljana.Orange
conda install orange3
pip install orange3 # requires PyQt6 firstFile → Preprocess → Select Features
→ Train/Test Split → Random Forest → Evaluate
→ PCA → Scatter Plot (colored by class)name: xonsh-python-shell description: > xonsh - Python-powered cross-platform shell. Superset of Python 3: mix shell commands and Python code in the same session. Direct manipulation of command outputs as Python objects. Extension system (xontribs/plugins). AI-friendly. Used by conda, mamba, Snakemake, Jupyter. pip install xonsh. USE FOR:
tags: [xonsh, Python-shell, hybrid, cross-platform, scripting, automation, xontribs] kind: tool category: pro-code-architecture
Python-powered shell — superset of Python 3, cross-platform, AI-friendly.
pip install xonsh
# or via conda:
conda install -c conda-forge xonsh# Standard shell commands
cd $HOME
cat /etc/passwd | grep root
# Python variables in commands
name = "snail"
echo @(name) > /tmp/@(name)
# Python expressions
var = "hello".upper()
echo @(var)
# Command output as Python object
result = $(ls -la).split("\n")
print(len(result))
# Mixed pipeline
len($(curl -L https://xon.sh))
# Subprocess mode with Python control flow
for f in $(find . -name "*.py").split():
print(f)xpip install xontrib-vox # virtual environment manager
xpip install xontrib-prompt-ret # return code in prompt
xpip install xontrib-autojump # autojump integrationname: orange3-data-mining description: > Orange3 - open-source visual data mining and ML platform by Univ. of Ljubljana. No-code canvas-based workflow: connect widgets for data loading, preprocessing, visualization, classification, clustering, regression. Add-ons: text, time series, bioinformatics, image analytics, geo. pip/conda/winget install. USE FOR:
tags: [Orange3, visual-ML, data-mining, no-code, clustering, classification, regression] kind: tool category: pro-code-architecture
Visual data mining and ML toolbox — no programming required.
winget install --id UniversityofLjubljana.Orange
conda install orange3
pip install orange3 # requires PyQt6 firstFile → Preprocess → Select Features
→ Train/Test Split → Random Forest → Evaluate
→ PCA → Scatter Plot (colored by class)name: opencv description: > OpenCV - Open Source Computer Vision Library. 86k stars, 14 modules. imgproc (filtering/contours/warp), dnn (YOLO/ONNX inference), features2d (SIFT/ORB/AKAZE matching), objdetect (Haar/HOG/QR), calib3d, tracking (KCF/CSRT). pip install opencv-contrib-python. C++ and Python. USE FOR:
tags: [OpenCV, computer-vision, image-processing, DNN, YOLO, SIFT, ORB, contours, tracking, Python, C++] kind: library category: programmatic-drawing
Open Source Computer Vision Library.
pip install opencv-contrib-python # recommended (includes SIFT, tracking)
pip install opencv-contrib-python-headless # no GUI (servers)import cv2
print(cv2.__version__) # e.g. 4.9.0| Module | Key Functions |
|---|---|
| core | Mat, imread, imwrite, cvtColor |
| imgproc | GaussianBlur, Canny, threshold, findContours, warpPerspective |
| features2d | SIFT, ORB, AKAZE, BFMatcher, FLANN |
| objdetect | CascadeClassifier, QRCodeDetector |
| dnn | readNetFromONNX, blobFromImage, forward |
| video | BackgroundSubtractor, calcOpticalFlow |
| calib3d | calibrateCamera, undistort, findHomography |
| tracking | TrackerKCF, TrackerCSRT, TrackerMOSSE |
| ml | SVM, KMeans |
| photo | inpaint, fastNlMeansDenoising |
import cv2, numpy as np
img = cv2.imread("image.jpg") # BGR uint8
gray = cv2.cvtColor(img, cv2.COLOR_BGR2GRAY)
hsv = cv2.cvtColor(img, cv2.COLOR_BGR2HSV)
rgb = cv2.cvtColor(img, cv2.COLOR_BGR2RGB) # for matplotlib
h, w, c = img.shape
roi = img[y1:y2, x1:x2] # crop
cv2.imwrite("out.jpg", img)
cv2.imshow("win", img); cv2.waitKey(0)blur = cv2.GaussianBlur(gray, (5,5), 0)
median = cv2.medianBlur(gray, 5) # salt-and-pepper
bilat = cv2.bilateralFilter(img, 9, 75, 75) # edge-preserving
edges = cv2.Canny(blur, 50, 150)
kernel = cv2.getStructuringElement(cv2.MORPH_ELLIPSE, (5,5))
opened = cv2.morphologyEx(binary, cv2.MORPH_OPEN, kernel) # remove noise
closed = cv2.morphologyEx(binary, cv2.MORPH_CLOSE, kernel) # fill holes_, binary = cv2.threshold(gray, 127, 255, cv2.THRESH_BINARY)
_, otsu = cv2.threshold(gray, 0, 255, cv2.THRESH_BINARY + cv2.THRESH_OTSU)
adaptive = cv2.adaptiveThreshold(gray, 255,
cv2.ADAPTIVE_THRESH_GAUSSIAN_C, cv2.THRESH_BINARY, 11, 2)
# Color range mask
lower = np.array([100, 50, 50])
upper = np.array([130, 255, 255])
mask = cv2.inRange(hsv, lower, upper)cnts, hier = cv2.findContours(binary, cv2.RETR_TREE, cv2.CHAIN_APPROX_SIMPLE)
for cnt in cnts:
area = cv2.contourArea(cnt)
if area < 500: continue
peri = cv2.arcLength(cnt, True)
approx = cv2.approxPolyDP(cnt, 0.02*peri, True)
x,y,w,h = cv2.boundingRect(cnt)
M = cv2.moments(cnt)
cx = int(M["m10"] / M["m00"]) # centroid
cy = int(M["m01"] / M["m00"])
cv2.drawContours(img, [cnt], 0, (0,255,0), 2)
# Shape by vertex count
n = len(approx)
if n == 3: shape = "triangle"
elif n == 4: shape = "quad/rect"
elif n == 5: shape = "pentagon"
else: shape = "circle"src = np.float32([[tl_x,tl_y],[tr_x,tr_y],[bl_x,bl_y],[br_x,br_y]])
dst = np.float32([[0,0],[W,0],[0,H],[W,H]])
M = cv2.getPerspectiveTransform(src, dst)
warped = cv2.warpPerspective(img, M, (W, H))sift = cv2.SIFT_create()
orb = cv2.ORB_create(nfeatures=1500)
kp1, des1 = sift.detectAndCompute(img1, None)
kp2, des2 = sift.detectAndCompute(img2, None)
bf = cv2.BFMatcher(cv2.NORM_L2) # L2 for SIFT
# bf = cv2.BFMatcher(cv2.NORM_HAMMING) # Hamming for ORB/AKAZE
matches = bf.knnMatch(des1, des2, k=2)
good = [m for m,n in matches if m.distance < 0.75*n.distance]
if len(good) > 10:
src_pts = np.float32([kp1[m.queryIdx].pt for m in good]).reshape(-1,1,2)
dst_pts = np.float32([kp2[m.trainIdx].pt for m in good]).reshape(-1,1,2)
H, mask = cv2.findHomography(src_pts, dst_pts, cv2.RANSAC, 5.0)| Detector | Speed | Scale inv | Notes |
|---|---|---|---|
| SIFT | Slow | Yes | Most accurate |
| ORB | Fast | No | Free, real-time |
| AKAZE | Medium | Yes | Balanced |
| FAST | Very fast | No | Corners only |
face_cascade = cv2.CascadeClassifier(
cv2.data.haarcascades + "haarcascade_frontalface_alt.xml")
faces = face_cascade.detectMultiScale(gray, 1.1, 5, minSize=(30,30))
for (x,y,w,h) in faces:
cv2.rectangle(img, (x,y), (x+w,y+h), (255,0,0), 2)
qr = cv2.QRCodeDetector()
data, pts, _ = qr.detectAndDecode(img)net = cv2.dnn.readNetFromONNX("yolov8n.onnx")
# Optional GPU: net.setPreferableBackend(cv2.dnn.DNN_BACKEND_CUDA)
blob = cv2.dnn.blobFromImage(img, 1/255, (640,640), swapRB=True)
net.setInput(blob)
outputs = net.forward(net.getUnconnectedOutLayersNames())
for det in outputs[0]:
scores = det[5:]
class_id = np.argmax(scores)
confidence = scores[class_id]
if confidence > 0.5:
cx,cy,bw,bh = (det[:4] * np.array([W,H,W,H])).astype(int)
cv2.rectangle(img, (cx-bw//2, cy-bh//2), (cx+bw//2, cy+bh//2), (0,255,0), 2)Supported: ONNX | TensorFlow .pb | Caffe | Darknet YOLO | OpenVINO IR
tracker = cv2.TrackerCSRT_create() # best accuracy
# tracker = cv2.TrackerKCF_create() # balanced
# tracker = cv2.TrackerMOSSE_create() # fastest
ok = tracker.init(frame, (x, y, w, h))
while cap.isOpened():
ok, frame = cap.read()
ok, bbox = tracker.update(frame)
if ok:
x,y,w,h = [int(v) for v in bbox]
cv2.rectangle(frame, (x,y), (x+w,y+h), (0,255,0), 2)objp = np.zeros((6*9,3), np.float32)
objp[:,:2] = np.mgrid[0:9,0:6].T.reshape(-1,2)
objpts, imgpts = [], []
for img in calib_images:
gray = cv2.cvtColor(img, cv2.COLOR_BGR2GRAY)
ret, corners = cv2.findChessboardCorners(gray, (9,6))
if ret:
objpts.append(objp)
imgpts.append(cv2.cornerSubPix(gray, corners, (11,11), (-1,-1),
(cv2.TERM_CRITERIA_EPS + cv2.TERM_CRITERIA_MAX_ITER, 30, 0.001)))
ret, mtx, dist, rvecs, tvecs = cv2.calibrateCamera(objpts, imgpts, gray.shape[::-1], None, None)
undist = cv2.undistort(frame, mtx, dist)# Background subtraction
fgbg = cv2.createBackgroundSubtractorMOG2(history=500, detectShadows=True)
fgmask = fgbg.apply(frame)
# Sparse optical flow (Lucas-Kanade)
p0 = cv2.goodFeaturesToTrack(prev_gray, 100, 0.3, 7)
p1, st, _ = cv2.calcOpticalFlowPyrLK(prev_gray, gray, p0, None)
good_new = p1[st==1]
# Dense optical flow
flow = cv2.calcOpticalFlowFarneback(prev_gray, gray, None, 0.5, 3, 15, 3, 5, 1.2, 0)
mag, ang = cv2.cartToPolar(flow[...,0], flow[...,1])cv2.line(img, (x1,y1), (x2,y2), (B,G,R), thickness)
cv2.rectangle(img, (x1,y1), (x2,y2), color, thickness) # -1 = filled
cv2.circle(img, (cx,cy), radius, color, thickness)
cv2.putText(img, "text", (x,y), cv2.FONT_HERSHEY_SIMPLEX, scale, color, thickness)
cv2.polylines(img, [pts], isClosed=True, color, thickness)
cv2.arrowedLine(img, pt1, pt2, color, thickness)# Used in chess/ desktop app (board_detector.py)
gray = cv2.cvtColor(screen, cv2.COLOR_BGR2GRAY)
blur = cv2.GaussianBlur(gray, (5,5), 0)
edges = cv2.Canny(blur, 50, 150)
cnts, _ = cv2.findContours(edges, cv2.RETR_EXTERNAL, cv2.CHAIN_APPROX_SIMPLE)
board = max(cnts, key=cv2.contourArea) # largest contour = board
approx = cv2.approxPolyDP(board, 0.02*cv2.arcLength(board,True), True)
# approx should have 4 points for the board corners
warped = cv2.warpPerspective(screen, M, (512, 512))
# Then split warped into 8x8 grid -> classify each squarename: xonsh-python-shell description: > xonsh - Python-powered cross-platform shell. Superset of Python 3: mix shell commands and Python code in the same session. Direct manipulation of command outputs as Python objects. Extension system (xontribs/plugins). AI-friendly. Used by conda, mamba, Snakemake, Jupyter. pip install xonsh. USE FOR:
tags: [xonsh, Python-shell, hybrid, cross-platform, scripting, automation, xontribs] kind: tool category: pro-code-architecture
Python-powered shell — superset of Python 3, cross-platform, AI-friendly.
pip install xonsh
# or via conda:
conda install -c conda-forge xonsh# Standard shell commands
cd $HOME
cat /etc/passwd | grep root
# Python variables in commands
name = "snail"
echo @(name) > /tmp/@(name)
# Python expressions
var = "hello".upper()
echo @(var)
# Command output as Python object
result = $(ls -la).split("\n")
print(len(result))
# Mixed pipeline
len($(curl -L https://xon.sh))
# Subprocess mode with Python control flow
for f in $(find . -name "*.py").split():
print(f)xpip install xontrib-vox # virtual environment manager
xpip install xontrib-prompt-ret # return code in prompt
xpip install xontrib-autojump # autojump integration~30 seconds. Free. No account. Every finding cites a rule and a line of evidence.