If you have a Linux machine with KVM on it, you can manage those VMs remotely from a Mac using virt-manager.
SSH to the Linux machine and add your SSH user to the libvirt group
sudo usermod -a -G libvirt $(whoami)
| md2clip() { | |
| local tmpfile=$(mktemp /tmp/md2clip_XXXXXX.html) | |
| pandoc -f markdown -t html "$1" \ | |
| | sed -E \ | |
| -e 's|<li><p( [^>]*)?>|<li>|g; s|</p></li>|</li>|g' \ | |
| -e 's|<(ul\|ol)>|<\1 style="margin:0.25em 0 0.75em 0;">|g' \ | |
| -e 's|<li>|<li style="margin:0 0 0.15em 0;">|g' \ | |
| -e 's|<p>|<p style="margin:0;">|g' \ | |
| > "$tmpfile" | |
| osascript -l JavaScript -e ' |
| #!/usr/bin/env uv run | |
| # /// script | |
| # dependencies = [ | |
| # "pymupdf", | |
| # ] | |
| # /// | |
| import fitz | |
| def highlight_rows(input_pdf, output_pdf): |
| #!/usr/bin/env python3 | |
| """ | |
| Parse SVG file to find unfamiliar topics that have no unfamiliar or just-started-learning prerequisites. | |
| """ | |
| import re | |
| import xml.etree.ElementTree as ET | |
| from collections import defaultdict | |
| from typing import Dict, List, Set, Tuple |
| import numpy as np | |
| from sklearn.decomposition import FactorAnalysis | |
| from sklearn.preprocessing import StandardScaler | |
| import pandas as pd | |
| import seaborn as sns | |
| import matplotlib.pyplot as plt | |
| # --- Parameters --- | |
| # Spearman's early work involved small numbers of tests/variables and modest samples. | |
| n_subjects = 200 # Number of simulated individuals |
| #!/usr/bin/env -S uv run --script | |
| # /// script | |
| # requires-python = ">=3.11" | |
| # dependencies = [ | |
| # "python-dotenv", | |
| # "openai", | |
| # ] | |
| # /// | |
| import os |
| #!/usr/bin/env -S uv run --script | |
| # /// script | |
| # requires-python = ">=3.8" | |
| # dependencies = [ | |
| # "opencv-python>=4.5.0", | |
| # "numpy>=1.20.0", | |
| # "pillow>=8.0.0", | |
| # ] | |
| # /// |
| #!/bin/bash | |
| # Check if an input file was provided | |
| if [ $# -ne 1 ]; then | |
| echo "Usage: $0 <input.mp3>" | |
| exit 1 | |
| fi | |
| input_file="$1" |
| #!/bin/bash | |
| # Check if a filename was provided | |
| if [ $# -ne 1 ]; then | |
| echo "Usage: $0 <pdf-file>" | |
| exit 1 | |
| fi | |
| # Convert to absolute paths | |
| input_pdf=$(realpath "$1") |
| #!/usr/bin/env -S uv run --script | |
| # /// script | |
| # requires-python = ">=3.12.2" | |
| # dependencies = [ | |
| # "deepface", | |
| # "pandas==2.2.3", | |
| # "tqdm==4.67.1", | |
| # "opencv-contrib-python==4.10.0.84", | |
| # "tensorflow==2.18.0", | |
| # "keras==3.7.0", |