Skip to content

Instantly share code, notes, and snippets.

View aigoncharov's full-sized avatar

Andrey Goncharov aigoncharov

View GitHub Profile
@aigoncharov
aigoncharov / .eslintignore
Last active October 22, 2020 18:39
Initializing new TypeScript project
# don't ever lint node_modules
node_modules
# don't lint build output (make sure it's set to your correct build folder name)
dist
# don't lint nyc coverage output
coverage
@peterhurford
peterhurford / install_xelatex_on_mac.txt
Last active May 4, 2025 07:55
How to install latex and xelatex on Mac so that Jupyter "Download as PDF" will work
brew install pandoc
brew tap homebrew/cask
brew install --cask basictex
eval "$(/usr/libexec/path_helper)"
# Update $PATH to include `/usr/local/texlive/2022basic/bin/universal-darwin`
sudo tlmgr update --self
sudo tlmgr install texliveonfly
sudo tlmgr install xelatex
sudo tlmgr install adjustbox
sudo tlmgr install tcolorbox
@judaew
judaew / keychron_k2.adoc
Last active May 8, 2025 12:45
Keychron K2 Manual

Keychron K2 Manual

Connect Bluetooth

On the side of the keyboard, switch the toggle to Bluetooth. Press fn+1 3 seconds and pair with device named Keychron K2.

  • fn+1 connect to 1st device

  • fn+2 connect to 2nd device

  • fn+3 connect to 3rd device

@33eyes
33eyes / commit_jupyter_notebooks_code_to_git_and_keep_output_locally.md
Last active May 8, 2025 14:11
How to commit jupyter notebooks without output to git while keeping the notebooks outputs intact locally

Commit jupyter notebooks code to git and keep output locally

  1. Add a filter to git config by running the following command in bash inside the repo:
git config filter.strip-notebook-output.clean 'jupyter nbconvert --ClearOutputPreprocessor.enabled=True --to=notebook --stdin --stdout --log-level=ERROR'  
  1. Create a .gitattributes file inside the directory with the notebooks

  2. Add the following to that file:

@califa
califa / due_date_labels.css
Created August 27, 2023 22:34
Obsidian Tasks due date labels
/* Subtle backlink style */
li.plugin-tasks-list-item span.tasks-backlink > a {
content: url("data:image/svg+xml,%3Csvg width='24' height='24' viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Crect width='15' height='15'");
background: #999;
-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' width='16' height='16' fill='none' stroke='currentColor' stroke-linecap='round' stroke-linejoin='round' stroke-width='2'%3E%3Cpath d='M14.05 11.364a4.992 4.992 0 0 0-4.88-2.192 4.978 4.978 0 0 0-2.827 1.414L4.929 12a5 5 0 0 0 7.07 7.071l.708-.707m-2.758-5.728a4.992 4.992 0 0 0 4.88 2.192 4.978 4.978 0 0 0 2.828-1.414L19.07 12A5 5 0 0 0 12 4.929l-.707.707' /%3E%3C/svg%3E");
height: .9em;
margin-bottom: -0.05em;
font-size: 16px;
margin-left: 0.2em;
}
@willccbb
willccbb / grpo_demo.py
Last active May 13, 2025 01:02
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