Skip to content

Instantly share code, notes, and snippets.

@mrmans0n
mrmans0n / CompositeParameterProvider.kt
Created May 18, 2022 14:56
Simple example that allows you to add 2 PreviewParameterProviders to a Compose preview
import androidx.compose.ui.tooling.preview.PreviewParameterProvider
import kotlin.reflect.KClass
/**
* Creates a [PreviewParameterProvider] based on the classes of two existing providers.
*
* You can create your own easily with Kotlin delegation:
* ```
* class ExampleProvider : PreviewParameterProvider<Pair<Type1, Type2>>
* by compositeProvider(Type1ParameterProvider::class, Type2ParameterProvider::class)
@willccbb
willccbb / grpo_demo.py
Last active March 15, 2025 14:54
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
@letanure
letanure / estados-cidades.json
Last active March 15, 2025 14:53
JSON estados cidades do brasil, dividido por estados. segunda lista atualizada em 2020, dados do IBGE
{
"estados": [
{
"sigla": "AC",
"nome": "Acre",
"cidades": [
"Acrelândia",
"Assis Brasil",
"Brasiléia",
"Bujari",
@ejdyksen
ejdyksen / patch-edid.md
Last active March 15, 2025 14:50
A script to fix EDID problems on external monitors in macOS

patch-edid.rb

A script to fix EDID problems on external monitors in macOS.

Instructions

  1. Connect only the problem display.

  2. Create this directory structure (if it doesn't already exist):

@Zhaoyilunnn
Zhaoyilunnn / optical_computing.md
Last active March 15, 2025 14:49
optical_computing
@mobilemind
mobilemind / git-tag-delete-local-and-remote.sh
Last active March 15, 2025 14:47
how to delete a git tag locally and remote
# delete local tag '12345'
git tag -d 12345
# delete remote tag '12345' (eg, GitHub version too)
git push origin :refs/tags/12345
# alternative approach
git push --delete origin tagName
git tag -d tagName
@Cur10s1tyByt3
Cur10s1tyByt3 / Web_Pentesting_Resources.md
Last active March 15, 2025 14:46
Web Pentesting Resources
@Cur10s1tyByt3
Cur10s1tyByt3 / iOS_RE_Resources.md
Last active March 15, 2025 14:46
iOS RE Resources