Skip to content

Instantly share code, notes, and snippets.

View aigoncharov's full-sized avatar

Andrey Goncharov aigoncharov

View GitHub Profile
@willccbb
willccbb / grpo_demo.py
Last active May 2, 2025 08:43
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
@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;
}
@33eyes
33eyes / commit_jupyter_notebooks_code_to_git_and_keep_output_locally.md
Last active May 2, 2025 12:05
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:

@judaew
judaew / keychron_k2.adoc
Last active April 22, 2025 12:50
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

@peterhurford
peterhurford / install_xelatex_on_mac.txt
Last active April 16, 2025 19:41
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
@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
@garcia556
garcia556 / get.c
Created December 3, 2017 21:08
POSIX shared memory IPC example (shm_open, mmap), working on Linux and macOS
#include <stdio.h>
#include <sys/mman.h>
#include <fcntl.h>
#include <unistd.h>
#include <string.h>
#define STORAGE_ID "/SHM_TEST"
#define STORAGE_SIZE 32
int main(int argc, char *argv[])
@NathanTheGr8
NathanTheGr8 / ufw home media server app profile.md
Last active July 31, 2024 13:31 — forked from andrey-str/ufw plexmediaserver app profile.md
Plex Media Server, Sonarr, Radarr, Deluge, NzbGet UFW rule
[plexmediaserver]
title=Plex Media Server
description=The Plex Media Server is smart software that makes playing Movies, TV Shows and other media on your computer simple
ports=32400/tcp|1900/udp|32469/udp|5353/udp

[sonarr]
title=Sonarr
description=Sonarr is a PVR for Usenet and BitTorrent users
ports=8989/tcp|8989/udp
@joyrexus
joyrexus / README.md
Last active December 30, 2024 01:37
collapsible markdown

collapsible markdown?

CLICK ME

yes, even hidden code blocks!

print("hello world!")
@craigbeck
craigbeck / introspection-query.graphql
Created April 6, 2016 20:20
Introspection query for GraphQL
query IntrospectionQuery {
__schema {
queryType { name }
mutationType { name }
subscriptionType { name }
types {
...FullType
}
directives {