Skip to content

Instantly share code, notes, and snippets.

View shntnu's full-sized avatar

Shantanu Singh shntnu

View GitHub Profile
@shntnu
shntnu / simplest_agent_notebook.py
Created May 15, 2026 21:12
Simplest agent loop, unrolled in a marimo notebook. Run: uvx marimo edit <url>
# /// script
# requires-python = ">=3.10"
# dependencies = ["marimo", "ollama"]
# ///
import marimo
__generated_with = "0.20.4"
app = marimo.App(width="medium")
@shntnu
shntnu / sample_output.txt
Last active May 15, 2026 21:21
Simplest possible agent: LLM-in-a-loop with one bash tool, via Ollama. Run: uv run https://...
═══ TURN 1 ═══
→ sending 2 messages to qwen2.5:7b
[0] system 'You are an agent with a bash tool. Always use the bash tool to gather informatio'
[1] user 'How many files are in /tmp? Run a command to find out.'
← assistant wants to call 1 tool(s):
• bash({'cmd': 'ls -1 /tmp | wc -l'})
▶ running: ls -1 /tmp | wc -l
◀ stdout (3 bytes):
'60\n'
@shntnu
shntnu / 2026-05-06__embl__apprentices.md
Created May 6, 2026 14:02
Apprentices - EMBL talk (Huber group), 6 May 2026
marp true
theme default
paginate true

Apprentices

Shantanu Singh Sr. Group Leader, Broad Institute

@shntnu
shntnu / compoundvalet_identifier_gap.sql
Last active February 17, 2026 02:28
CompoundValet CSV identifier gap analysis — run in https://shell.duckdb.org/
-- CompoundValet CSV: no structural identifiers → can't join to other databases
-- Paste into https://shell.duckdb.org/
--
-- The Drug Repurposing Hub is a similar drug-target database but includes
-- InChIKey, SMILES, and PubChem CID — making it instantly joinable.
-- CompoundValet has only drug names.
-- Load CompoundValet
CREATE TABLE cv AS
SELECT * FROM read_csv_auto(
@shntnu
shntnu / compute_etag.sh
Created July 25, 2022 18:51 — forked from rajivnarayan/compute_etag.sh
Calculate checksum corresponding to the entity-tag hash (ETag) of Amazon S3 objects
#!/bin/bash
#
# Calculate checksum corresponding to the entity-tag hash (ETag) of Amazon S3 objects
#
# Usage: compute_etag.sh <filename> <part_size_mb>
#
# filename: file to process
# part_size_mb: chunk size in MiB used for multipart uploads.
# This is 8M by default for the AWS CLI See:
# https://docs.aws.amazon.com/cli/latest/topic/s3-config.html#multipart_chunksize