Skip to content

Instantly share code, notes, and snippets.

View jcfr's full-sized avatar
🎯
Focusing

Jean-Christophe Fillion-Robin jcfr

🎯
Focusing
View GitHub Profile
@lassoan
lassoan / AGENTS-3DSlicerExtensionDevelopment.md
Last active September 14, 2026 15:45
AGENTS.md for Slicer module development

Helpful instructions for AI agents for 3D Slicer extension development

Connect to 3D Slicer

Never ask the user to copy-paste code. Instead, use Slicer web server that allows execution of Python code via a web API.

You can connect to a running instance of 3D Slicer by giving these instructions to the user: Go to Web Server module, enable "Slicer API exec" in Advanced section, and click "Start server" button.

Alternatively, find a free port (2016, 2017, 2018, ...) and start 3D Slicer with the Web Server "Slicer API exec" endpoint enabled:

@agirault
agirault / agents_config_compat.md
Last active April 24, 2026 06:50
Agent Tool Cross-Compatibility Matrix

Agent Tool Cross-Compatibility Matrix

Last updated: 2026-03-13

Instructions & Rules

How each tool discovers project-level instruction, guidance, and rule files.

[!NOTE]

@agirault
agirault / cuda_sm_compatibility_matrix.md
Last active September 5, 2026 14:06
CUDA GPU Compute Capability - Compatibility
@ChristopherA
ChristopherA / git_worktrees.md
Last active September 17, 2026 06:31
Git Worktree Best Practices and Tools

Git Worktree Best Practices and Tools

Last Updated: 2024-02-06

Overview

Git worktrees allow you to check out multiple branches simultaneously in separate directories, while sharing a single .git metadata store.

THere are some best practices, useful Git aliases, and shell functions for efficiently managing Git worktrees. It covers:

  • Setting up Git aliases for worktree operations.
  • Using shell functions for enhanced worktree management.

The issue

When a fixture is not used but needs to be included for some reasons, pylint will rightfully issue a warning. For instance, a fixture setup a specific database state and another fixture include it to ensure database is in a specific state.

@pytest.fixture
def init_database():
    """Setup database state"""
    ...
volumesDir = r"c:\Users\andra\OneDrive\Projects\SlicerTesting4\20190523-AutoWWWL\volumes"
screenshotsDir = r"c:\Users\andra\OneDrive\Projects\SlicerTesting4\20190523-AutoWWWL\screenshots"
methods = [
["baseline", autoContrastSlicerDefault],
["hist-0.1-99.9", lambda fn: autoContrastVtkImageHistogramStatisticsDefault(fn, 0.1, 99.9, 0.00, 0.0)], # = itksnap
["hist-1.0-99.9", lambda fn: autoContrastVtkImageHistogramStatisticsDefault(fn, 1.0, 99.9, 0.10, 0.0)],
["hist-1.0-99.0-x0.10", lambda fn: autoContrastVtkImageHistogramStatisticsDefault(fn, 1.0, 99.0, 0.10, 0.10)],
["hist-1.0-99.0-x0.20", lambda fn: autoContrastVtkImageHistogramStatisticsDefault(fn, 1.0, 99.0, 0.10, 0.20)],
]
@jhodges10
jhodges10 / liqui_tx_history_to_csv
Last active April 9, 2018 03:48
Export Liqui trades via the API to a Bitcoin Tax compatible CSV
from liqui import Liqui # https://pypi.python.org/pypi/liqui
import datetime
import pandas as pd
api_key = 'YOUR_API_KEY'
api_secret = 'YOU_API_SECRET'
csv_filename = 'liqui_tx.csv'
@thewtex
thewtex / README.md
Last active January 19, 2018 21:33 — forked from juanpabloaj/README.md
Total of pip packages downloaded, separated by Python versions

Total of pip packages downloaded separated by Python versions

From September 26, 2017 to November 31, 2017.

Python versions from 2.6 to 3.6

downloads by version

@letsjustfixit
letsjustfixit / bashrc
Last active March 26, 2018 06:58
bashrc, screenrc
# ~/.bashrc: executed by bash(1) for non-login shells.
# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc)
# for examples
# If not running interactively, don't do anything
case $- in
*i*) ;;
*) return;;
esac
@chrisoldwood
chrisoldwood / PowerShellExitTest.ps1
Last active July 22, 2024 04:12
A set of tests to show if your version of PowerShell returns the correct exit code under various error conditions.
exit 1