Skip to content

Instantly share code, notes, and snippets.

@joowkim
joowkim / gist:135544a6dbefc47e12507ace0643fe62
Created August 13, 2026 14:24
renv and capture session info
renv::init()
options(repos = BiocManager::repositories())
renv::snapshot()
renv::restore()
writeLines(capture.output(sessionInfo()), "sessionInfo.txt")
@joowkim
joowkim / verify-claim-prompt.md
Last active August 8, 2026 21:45
verify claim prompt

After answering the question below, review the facts separately. Break each core claim into a table with the following columns:

  1. Core claim
  2. Supporting source link, or the original text of provided material
  3. Verification status: Confirmed / Needs further check / No basis
  4. As-of date of the information
  5. Additional search terms to check further

If you can't find a source, don't guess, mark it "Unable to confirm."

@joowkim
joowkim / prompt-template.md
Last active August 8, 2026 21:44
prompt template

I want to do [task]. Don't produce the output right away.

First, ask me the questions you need to design a good prompt for this task. Ask them one at a time, starting with the most important, not all at once. If my answer is vague, give me concrete examples and check again. If you're fairly confident about a reasonable default for a minor detail, just state your assumption instead of asking.

Once you have enough information, proceed in this order:

  1. Summarize my request and goal
  2. Write the optimized final prompt
  3. Explain the important parts of the prompt
  4. Execute the completed prompt yourself
https://lbelzile.github.io/experimental/content/
https://sites.google.com/view/statisticsfortherealworldagent/one-way-anova-and-follow-up-procedures?authuser=0
https://textbooks.math.gatech.edu/ila/linear-independence.html
https://www.youtube.com/@mikecrowson2462/courses
https://saraemilyburke.com/statistics.html
@joowkim
joowkim / samplesheet_validation.html
Created January 26, 2025 19:37
samplesheet_validation.html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Sample_ID Validation</title>
<!-- Bootstrap CSS -->
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css" rel="stylesheet">
<style>
.invalid {
@joowkim
joowkim / gist:35db1cae580449a8aa6f2e031d1b7bd9
Created April 1, 2024 17:37
geom_jitter: how to get rid of duplicate dots?
geom_boxplot(outlier.colour=NA )
@joowkim
joowkim / renamer.sh
Created April 1, 2024 13:58
fastq file rename
renamer 's@_R([12])\.fastq\.gz@-R$1.fastq.gz@' *.gz -v
import sys
import openai
import json
import pandas as pd
from Bio import Entrez
from datetime import datetime
from PyQt6 import QtWidgets, QtGui
from PyQt6.QtCore import Qt
# Replace with your own ChatGPT API key
@joowkim
joowkim / coin_test.Rscript
Last active October 11, 2022 13:33
coin-test problem
func <- function(num) {
result <- c()
vec <- c("TT", "TT", "HT", "TH", "HH", "HH")
# bst <- sample(vec, num, replace = T)
for (i in 1:num) {
coin <- sample(vec, 1)[1]
if (startsWith(coin, "H")) {
result <- c(result, coin)
Dockerfile
FROM rocker/r-ver
RUN /rocker_scripts/install_tidyverse.sh
RUN /rocker_scripts/install_python.sh
RUN R --quiet -e 'BiocManager::install("preprocessCore")'
RUN R --quiet -e 'install.packages("pacman", repos="http://cran.us.r-project.org")'
RUN R --quiet -e 'pacman::p_install("methods")'
RUN R --quiet -e 'pacman::p_install("lattice")'