Skip to content

Instantly share code, notes, and snippets.

View pmoranga's full-sized avatar

Pmoranga pmoranga

View GitHub Profile
@willccbb
willccbb / grpo_demo.py
Last active April 21, 2025 18:48
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
@rafaribe
rafaribe / alias.yml
Created February 27, 2023 11:46
k9s configuration
# $XDG_CONFIG_HOME/k9s/alias.yml
alias:
sec: v1/secrets
sm: monitoring.coreos.com/v1/servicemonitors
ss: apps/v1/statefulsets
udp: traefik.containo.us/v1alpha1/ingressrouteudps
@magickatt
magickatt / helm_chart_validate_matrix.yml
Created February 24, 2023 15:06
GitHub Action to validate multiple Helm charts at once
name: Validate Helm charts
on:
push:
branches: [ main, master ]
pull_request:
jobs:
validate:
runs-on: ubuntu-latest
@jgaskins
jgaskins / 000-provision.sh
Last active January 3, 2025 19:13
Running Mastodon on Kubernetes
#!/usr/bin/env bash
# Install nginx ingress controller
# NOTE: This uses DigitalOcean. If you use another Kubernetes provider,
# substitute the appropriate command from here: https://kubernetes.github.io/ingress-nginx/deploy/#cloud-deployments
kubectl apply -f https://raw.githubusercontent.com/kubernetes/ingress-nginx/controller-v1.5.1/deploy/static/provider/do/deploy.yaml
# FOR DIGITALOCEAN DEPLOYMENTS:
export LB_HOSTNAME=example.com # Make this the DNS name that will point to your LB
export LB_NAME=my-lb # Give this a useful name to identify it on the DigitalOcean control panel
@Paraphraser
Paraphraser / Checking your Raspberry Pi's view of its power supply.md
Last active April 17, 2025 15:30
Checking your Raspberry Pi's view of its power supply (sometimes it's not the wall-wart)

Checking your Raspberry Pi's view of its power supply

Sometimes it seems like the first (and sometimes only) advice you get offered for almost any problem with a Raspberry Pi is "check your power supply". You think something like:

"hey, I'm using an official power supply sold as being matched with my Pi so how can there be any problem?"

You look up the specs then stick a controlled load across your supply and confirm that it can deliver the required number of Watts.

Yet your problems persist…

@Phate334
Phate334 / docker-compose.yml
Last active March 2, 2024 01:33
JanusGraph and OpenSearch
version: "3"
services:
janusgraph:
image: janusgraph/janusgraph:0.6.2
container_name: jce-janusgraph
env_file:
- janusgraph.env
ports:
- "8182:8182"
@gruckion
gruckion / setup_mac.sh
Last active October 2, 2024 16:01
Setup Mac script
#!/bin/sh
####################################################################
# Check for Homebrew, install if we don't have it
####################################################################
if test ! $(which brew); then
echo "Installing homebrew..."
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
fi
@ursulacj
ursulacj / Create-branch-with-Github-API.md
Last active March 19, 2025 09:23 — forked from auwsome/Create-branch-with-Github-API.md
Create a branch on Github using API and Python

Create a branch on Github using API and Python

Created as a module that can be imported or run. Requires built in JSON, requests, and datetime modules.

Allows you to clone a branch on Github using the Github Git Database API Endpoints.

Forked Gist from:

  • auwsome/Create-branch-with-Github-API.md

See:

@ankurk91
ankurk91 / dnsmasq.md
Last active October 8, 2024 06:43
DNSmasq on Ubuntu 18/20

DNSmasq wildcard on Ubuntu 18/20

  • Install dnsmasq
sudo apt install -y dnsmasq
sudo apt install -y resolvconf
  • 💡 The dnsmasq service will fail to start, you can ignore those errors for time being
  • Disable the default systemd-resolved service
@dev-korr
dev-korr / rundeck-acl-config-map.yaml
Created January 31, 2021 08:36
configmap with acl policies for rundeck hosted on kubernetes.
apiVersion: v1
kind: ConfigMap
metadata:
name: acl-configmap
namespace: rundeck
labels:
app: rundeck
data:
custom.aclpolicy: |
description: Admin, all access for admin/SRE team - project context.