Skip to content

Instantly share code, notes, and snippets.

View cannin's full-sized avatar

Augustin Luna cannin

View GitHub Profile
@cannin
cannin / setup-zsh-in-codespaces.md
Last active November 1, 2025 14:20 — forked from ikrishagarwal/setup-zsh-in-codespaces.md
Setup starship, zsh suggestions and syntax highlight for your codespaces.
@cannin
cannin / check_pmcid.py
Created June 3, 2025 17:10
Fetching PMC Content and Extracting Text
import requests
from diskcache import Cache
import os
# Ensure cache directory exists
os.makedirs('cache', exist_ok=True)
cache = Cache('cache')
def check_pmcid(pmid, email="[email protected]"):
@cannin
cannin / file.md
Last active April 13, 2025 13:11
Sample Markdown File

H1

H2

Bold bold text Italic italicized text Ordered List

  1. First item
  2. Second item
  3. Third item Unordered List
  • First item
@cannin
cannin / summarize_environment_yaml.R
Created December 18, 2024 13:01
Summarize R Environment Variables
library(ggplot2)
library(yaml)
# Function to summarize a ggplot object
# TODO: dendrograms with hclust do not work
summarize_ggplot <- function(object) {
wrap <- function(x) paste(
paste(strwrap(x, exdent = 2), collapse = "\n"),
"\n", sep = ""
)
@cannin
cannin / pmc_llm_userscript.js
Last active November 22, 2024 04:07
PubMed Central LLM Summaries
// ==UserScript==
// @name PubMed Central LLM Summaries
// @namespace http://example.com
// @version 0.2
// @description Add LLM Summaries to PMC
// @author cannin
// @match https://pubmed.ncbi.nlm.nih.gov/?term=*
// @match https://pubmed.ncbi.nlm.nih.gov/*/
// @match https://www.ncbi.nlm.nih.gov/labs/pmc/articles/*/
// @match https://www.ncbi.nlm.nih.gov/pmc/articles/*/
@cannin
cannin / dspy_csv.py
Created August 16, 2024 15:37
DSPY Example with data from CSV and MIPROv2 optimizer; also, simple viewer code to inspect DSPY prompt history; dspy-ai = "2.4.13"
import json
import dspy
from dspy.teleprompt import BootstrapFewShot, LabeledFewShot
from dspy.evaluate import Evaluate, answer_exact_match
from dspy.datasets import DataLoader
# PURPOSE ----
# Example with dataset read from CSV using LLM judge to evaluate the answer
@cannin
cannin / test.tex
Created May 14, 2024 16:46
LaTeX Tiny Test
\begingroup
\fontsize{6pt}{12pt}\selectfont
\begin{verbatim}
6pt-tiny
\end{verbatim}
\endgroup
@cannin
cannin / README_caiman_docker.md
Last active September 7, 2023 10:56
Access CaImAn Pre-Installed in a Docker Image

RETRIEVE CaImAn DOCKER IMAGE

https://hub.docker.com/r/cannin/caiman

docker pull cannin/caiman:1.9.15-20230906

RUN CaImAn DOCKER CONTAINER

sudo docker rm -f cm; sudo docker run --name cm -d -p 4444:4444 -p 5900:5900 -8888:8888 -e SE_VNC_PASSWORD=password -v /home/ubuntu/tmp:/home/seluser/tmp --shm-size="4g" cannin/caiman:1.9.15-20230906
@cannin
cannin / lintr_defaults.R
Last active August 4, 2023 13:50
lintr Defaults
library(lintr)
# Excluded linters
# closed_curly_linter
# camel_case_linter
# implicit_integer_linter
# paren_brace_linter
# pipe_continuation_linter
# trailing_blank_lines_linter
# commented_code_linter
@cannin
cannin / tcga_hex_color_codes.csv
Created April 21, 2023 19:24
The Cancer Genome Atlas (TCGA) Hex Color Codes for Cancer Types
cancer_type cancer_type_color organ_system organ_system_color
BRCA #ED2891 Breast #e6308e
GBM #B2509E Central Nervous System #c48cbc
LGG #D49DC7 Central Nervous System #c48cbc
COAD #00AEEF Core_GI #7aa8d9
ESCA #007EB5 Core_GI #7aa8d9
READ #DAF1FC Core_GI #7aa8d9
STAD #00AEEF Core_GI #7aa8d9
COADREAD #00AEEF Core_GI #7aa8d9
STES #007EB5 Core_GI #7aa8d9