Skip to content

Instantly share code, notes, and snippets.

View kiranandcode's full-sized avatar
💭
thinking really hard

Kiran Gopinathan kiranandcode

💭
thinking really hard
View GitHub Profile
@kiranandcode
kiranandcode / dune
Created November 30, 2024 16:27
Simple Function Match Macros for OCaml
(library
(name macros)
(modules "macros")
(libraries ppxlib)
(kind ppx_rewriter)
(preprocess (pps ppxlib.metaquot)))
(executable
(public_name macros)
(modules "main")
from tqdm import tqdm
from transformers import AutoTokenizer, pipeline
from pathlib import Path
import torch
model_name = "kirancodes/llemma-7b-lora-sft-pretrained-RQ2"
tokenizer = AutoTokenizer.from_pretrained(model_name)
llama_pipeline = pipeline(
"text-generation",
tokenizer=tokenizer,
@kiranandcode
kiranandcode / init-orgroam.el
Created September 17, 2025 16:38
Config file snippet for setting up org-roam with org-ref and org-roam-bibtex.
(use-package org-roam
:straight t
:init
(setq org-roam-directory (file-truename "~/org/roam"))
(setq org-roam-dailies-directory "daily/")
(setq org-roam-dailies-capture-templates
'(("d" "default" entry
"* %?"
:target (file+head "%<%Y-%m-%d>.org"
"#+title: %<%Y-%m-%d>\n"))))
@kiranandcode
kiranandcode / slide-visual.rkt
Created October 10, 2025 20:26
slide-visual.rkt
(module slide-visual racket
(module slide-wrapper-linker racket
(require "viewer.rkt" slideshow/param slideshow/sig slideshow/cmdline)
(define custom-linker
(lambda (core@)
(println "calling custom linker")
(compound-unit
(import)
(export CORE CMDLINE VIEWER)