Skip to content

Instantly share code, notes, and snippets.

View ncoop57's full-sized avatar
🤓
I'm a nerd.

Nathan Cooper ncoop57

🤓
I'm a nerd.
View GitHub Profile
@willccbb
willccbb / grpo_demo.py
Last active February 28, 2025 06:58
GRPO Llama-1B
# train_grpo.py
#
# See https://github.com/willccbb/verifiers for ongoing developments
#
import re
import torch
from datasets import load_dataset, Dataset
from transformers import AutoTokenizer, AutoModelForCausalLM
from peft import LoraConfig
from trl import GRPOConfig, GRPOTrainer
# /// script
# dependencies = [
# "atproto"
# ]
# ///
from atproto import Client
import getpass
import time
@pydanny
pydanny / install-notes.md
Last active October 3, 2024 12:51
New mac installation

Terminal first!

  1. Try to avoid downloading anything directly. Rather, use homebrew, uv, and gh cli to install everything.
  2. At the end of each install, add the items suggested for going into the .zshrc

Install homebrew

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
@davidteren
davidteren / nerd_fonts.md
Last active February 26, 2025 19:08
Install Nerd Fonts via Homebrew [updated & fixed]
@andreyryabtsev
andreyryabtsev / backmatting.ipynb
Last active June 5, 2024 04:56
BackMatting.ipynb
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@ppisarczyk
ppisarczyk / Programming_Languages_Extensions.json
Last active February 20, 2025 10:02 — forked from aymen-mouelhi/languages.json
Programming Languages and their File Extensions
[
{
"name":"ABAP",
"type":"programming",
"extensions":[
".abap"
]
},
{
"name":"AGS Script",
@bwhite
bwhite / rank_metrics.py
Created September 15, 2012 03:23
Ranking Metrics
"""Information Retrieval metrics
Useful Resources:
http://www.cs.utexas.edu/~mooney/ir-course/slides/Evaluation.ppt
http://www.nii.ac.jp/TechReports/05-014E.pdf
http://www.stanford.edu/class/cs276/handouts/EvaluationNew-handout-6-per.pdf
http://hal.archives-ouvertes.fr/docs/00/72/67/60/PDF/07-busa-fekete.pdf
Learning to Rank for Information Retrieval (Tie-Yan Liu)
"""
import numpy as np
@rmetzler
rmetzler / gist:2947828
Created June 18, 2012 10:43
find all non UTF-8 encoded files
find . -type f | xargs -I {} bash -c "iconv -f utf-8 -t utf-16 {} &>/dev/null || echo {}" > utf8_fail