Skip to content

Instantly share code, notes, and snippets.

View ly0's full-sized avatar
👊
已全仓买入

latyas ly0

👊
已全仓买入
View GitHub Profile
@sohei1l
sohei1l / claude-revert-checkpoint.md
Last active July 15, 2025 08:19
CLAUDE.md rule for Git based Undo/Checkpoint in Claude Code

⚠️ MANDATORY SESSION RULES - MUST FOLLOW IMMEDIATELY

IMPORTANT: At the VERY START of any coding task, you MUST:

  1. Create a new branch using the format: claude-session-YYYYMMDD-[topic]
  2. Push the branch to origin
  3. Start committing changes immediately

Session Workflow

Starting a Session

@willccbb
willccbb / grpo_demo.py
Last active December 12, 2025 21:24
GRPO Llama-1B
# train_grpo.py
#
# See https://github.com/willccbb/verifiers for ongoing developments
#
"""
citation:
@misc{brown2025grpodemo,
title={Granular Format Rewards for Eliciting Mathematical Reasoning Capabilities in Small Language Models},
author={Brown, William},
@legraphista
legraphista / readme.md
Last active November 11, 2025 04:07
nvidia driver with p2p support for rtx 4090
# step 0 - cleanup your existing drivers
sudo apt-get --purge remove "*nvidia*"
sudo apt-get --purge remove "*cuda*" "*cudnn*" "*cublas*" "*cufft*" "*cufile*" "*curand*" "*cusolver*" "*cusparse*" "*gds-tools*" "*npp*" "*nvjpeg*" "nsight*" "*nvvm*" "*libnccl*"

# step 0.1 - disable iommu
ll /sys/class/iommu/
# if this folder is empty, continue
# if the folder is not empty, see https://docs.dolphinics.com/latest/guides/iommu.html
@MichaelCurrin
MichaelCurrin / self-extracting-shell-scripts.md
Last active February 8, 2025 01:24
Self-extracting shell scripts

Self-extracting shell scripts

Guide to using MakeSelf tool to create self-extracting shell scripts for easy distribution

How to package your shell scripts project as a release which can be easily downloaded, extracted, and run.

This is intended to work with one or more executable scripts that use a shell shebang. This could work with other shebangs I guss, but you're probably better off using the packaging approach for that language.

This guide is written for macOS / Linux.

@ohanetz
ohanetz / Dockerfile-jenkins
Last active October 1, 2022 09:03
Utilize Jenkins in an auto-scaling Kubernetes deployment on Amazon EKS
FROM jenkins/jenkins:2.204.5
RUN /usr/local/bin/install-plugins.sh ssh-slaves
RUN /usr/local/bin/install-plugins.sh kubernetes
USER root
RUN apt-get update && apt-get install -y maven
USER jenkins
@rocka
rocka / bbr.sh
Last active August 22, 2017 06:58
enable bbr in OpenVZ VPS
#!/bin/bash
fuser -k /dev/net/tun
# delete tap0
ip tuntap del dev tap0 mode tap
# add tap0
ip tuntap add dev tap0 mode tap
ip link set dev tap0 up
ip addr add dev tap0 10.0.0.1/24
@yrevar
yrevar / imagenet1000_clsidx_to_labels.txt
Last active November 21, 2025 06:36
text: imagenet 1000 class idx to human readable labels (Fox, E., & Guestrin, C. (n.d.). Coursera Machine Learning Specialization.)
{0: 'tench, Tinca tinca',
1: 'goldfish, Carassius auratus',
2: 'great white shark, white shark, man-eater, man-eating shark, Carcharodon carcharias',
3: 'tiger shark, Galeocerdo cuvieri',
4: 'hammerhead, hammerhead shark',
5: 'electric ray, crampfish, numbfish, torpedo',
6: 'stingray',
7: 'cock',
8: 'hen',
9: 'ostrich, Struthio camelus',
@danibram
danibram / iptables.sh
Created February 3, 2016 12:03
Redirect 443,80 to 8443,8080 on ubuntu with persistence
sudo iptables -A PREROUTING -t nat -i eth0 -p tcp --dport 80 -j REDIRECT --to-port 8080
sudo iptables -A PREROUTING -t nat -i eth0 -p tcp --dport 443 -j REDIRECT --to-port 8443
sudo sh -c "iptables-save > /etc/iptables.rules"
sudo apt-get install iptables-persistent
@imrickysu
imrickysu / xapp1078_2014.4.markdown
Last active July 13, 2018 11:16
The instructions of creating an AMP example design with PetaLinux tools

Xapp1078 Instructions for Vivado 2014.4

NOTE: The zedBoard flow has not been verified

Note: This xapp requires using a Linux host to compile the embedded Linux kernel. The instructions have been setup such that all implementation work will be done in a directory called xapp1078_2014.4/design and all linux work will be done in a directory called xapp1078_2014.4/plnx-project. The instructions will require files to be copied between xapp1078_2014.4/design and xapp1078_2014.4/plnx-project so if the Vivado and SDK tools are ran on a Windows machine, the files will need to be copied from the Windows xapp1078_2014.4/design to the Linux machine's xapp1078_2014.4/plnx-project.