Skip to content

Instantly share code, notes, and snippets.

View cannin's full-sized avatar

Augustin Luna cannin

View GitHub Profile
@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
@cannin
cannin / README.md
Last active June 26, 2024 20:01
rcellminer_chatgpt.ipynb

Getting Started

  1. Go to https://chat.openai.com/ and sign in (make an account if you do not have one)
  2. Copy and paste the following text into the text bar at the bottom of the page (after accepting the various terms and disclosures):
Imagine you are helping me interact with several dataset of cancer genomics data. At any given point of time, you have the following abilities. You are also required to output code for some of the requests.

Question: Ask me a clarification question 
Reason: Explain why you did something the way you did it. 
@cannin
cannin / calcium_actin_interactions.txt
Created February 15, 2023 03:31
Pathway Commons Extract Interactions with Specific Nodes
PARTICIPANT_A INTERACTION_TYPE PARTICIPANT_B INTERACTION_DATA_SOURCE INTERACTION_PUBMED_ID PATHWAY_NAMES MEDIATOR_IDS
ACTA2 in-complex-with CALD1 Reactome NA Smooth Muscle Contraction http://pathwaycommons.org/pc12/Complex_0518f6295b1ef06468655bd97bab06cd;http://pathwaycommons.org/pc12/Complex_31d66cd5a279d9da536a7808146a93e4;http://pathwaycommons.org/pc12/Complex_c0fb59281e2cbea8227d357ffd78f564;http://pathwaycommons.org/pc12/Complex_73a822be281ea321fb7bbc8d3b2e5b10
ACTA2 in-complex-with ITGA1 Reactome NA Smooth Muscle Contraction http://pathwaycommons.org/pc12/Complex_0518f6295b1ef06468655bd97bab06cd;http://pathwaycommons.org/pc12/Complex_31d66cd5a279d9da536a7808146a93e4;http://pathwaycommons.org/pc12/Complex_c0fb59281e2cbea8227d357ffd78f564;http://pathwaycommons.org/pc12/Complex_73a822be281ea321fb7bbc8d3b2e5b10
ACTA2 in-complex-with ITGB5 Reactome NA Smooth Muscle Contraction http://pathwaycommons.org/pc12/Complex_0518f6295b1ef06468655bd97bab06cd;http://pathwaycommons.org/pc12/Complex_31d66cd5a279d9da536a7
@cannin
cannin / README.md
Last active July 6, 2024 13:19
kaios_data

KaiOS Data

Key Mapping

  • arrows: 37 L, 38 T, 39 R, 40 B
  • OK or sides: 0
  • OK hold is 13
  • 1: 49
  • 2: 50
  • 3: 51
  • 0: 48
/* Classless.css v1.0
Table of Contents:
1. Theme Settings
2. Reset
3. Base Style
4. Extras (remove unwanted)
5. Classes (remove unwanted)
*/
@cannin
cannin / config.json
Last active September 6, 2023 11:40
Use syblars (https://github.com/iVis-at-Bilkent/syblars) to Generate Layout and Render SBGNML to PNG using Python
{"layoutOptions": {
"name": "fcose",
"randomize": true,
"padding": 30
},
"imageOptions": {
"format": "png",
"background": "transparent",
"width": 1280,
"height": 1280,