Skip to content

Instantly share code, notes, and snippets.

View abrichr's full-sized avatar
😄
Building

Richard Abrich abrichr

😄
Building
View GitHub Profile
@abrichr
abrichr / creating-github-repos-with-gh.md
Created November 9, 2026 23:13
Creating GitHub repos from the command line with gh

Creating GitHub repos from the command line with gh

The GitHub CLI (gh) can create repositories directly, no browser needed.

Prerequisites

brew install gh        # macOS; see cli.github.com for other platforms
gh auth login          # interactive; grants the `repo` scope
gh auth status         # confirm which account is active
**PROMPT FOR LLM (copy+paste below, then append your plan)**
You are converting a **generic plan of action** into a **production-ready research/engineering `todo.md`** that is directly executable by a capable coding agent. Your output must be a single Markdown document with a fenced **XML `<workflows>`** block. Do **not** include any extra commentary, explanations, or chat—**output only the document**.
### Transformation requirements
* Be **specific** and **operational**. Replace vague goals with concrete steps, commands, checklists, acceptance gates, and explicit assumptions.
* Prefer **compact, high-signal prose**. No filler. Use short paragraphs and terse bullets.
* If information is missing, make **minimal, clearly labeled assumptions** (e.g., “Assumption: …”). Do **not** ask questions.
* Compile the spec into **executable oracles**: pre/postconditions, invariants, consumer/provider API contracts, and **metamorphic properties**. Generate both tests and **runtime guards**.
@abrichr
abrichr / get_pdf.py
Last active August 12, 2024 17:22
Get a PDF by its DOI
"""
Module to download a PDF from Sci-Hub using a provided DOI.
This script uses curl to fetch a PDF from Sci-Hub based on the provided DOI and
saves it to a specified output path.
Example usage:
python get_pdf.py "10.1038/s41586-020-2649-2" "output.pdf"
If no output path is specified, the DOI will be used as the filename with invalid
@abrichr
abrichr / gpt4v.py
Last active July 5, 2026 04:44
Example usage of GPT4-V API
# from https://github.com/OpenAdaptAI/OpenAdapt/blob/44d4a55f332ef3b846933b38854372d4166fd2ea/experiments/gpt4v.py
"""Example usage of GPT4-V API.
Usage:
OPENAI_API_KEY=<your_api_key> python3 gpt4v.py \
[<path/to/image1.png>] [<path/to/image2.jpg>] [...] "text prompt"
Example:
@abrichr
abrichr / install_caffe2_detectron.sh
Last active June 7, 2018 00:47 — forked from matsui528/install_caffe2_detectron.sh
Install script of caffe2 and detectron on AWS EC2 instance with Deep Learning Base AMI
# Install script of Caffe2 and Detectron on AWS EC2
#
# Tested environment:
# - AMI: Deep Learning Base AMI (Ubuntu) Version 3.0 - ami-38c87440 (CUDA is already installed)
# - Instance: p3.2xlarge (V100 * 1)
# - Caffe2: https://github.com/caffe2/caffe2/commit/e1f614a5f8ae92f4ecb828e1d5f84d2cd1fe12bd
# - Detectron: https://github.com/facebookresearch/Detectron/commit/a22302de27f9004422a96414ed4088d05c664978
#
# Usage:
# Launch a fresh EC2 instance, put this script on the /home/ubuntu/, and run the following command.