Skip to content

Instantly share code, notes, and snippets.

View pythoninthegrass's full-sized avatar

pythoninthegrass

View GitHub Profile
#!/usr/bin/env python3
# SOURCE: https://www.youtube.com/watch?v=xtFo1IiZqzM
import pandas as pd
from pathlib import Path
from tqdm import tqdm
fn = Path("../csv/anime_dataset/users-score-2023.csv")
@pythoninthegrass
pythoninthegrass / pull.yml
Created May 4, 2024 04:58
GitHub app Pull
# https://github.com/wei/pull#readme
---
version: "1"
rules:
- base: main
upstream: pythoninthegrass:main
mergeMethod: hardreset # Optional, one of [none, merge, squash, rebase, hardreset], Default: none.
mergeUnstable: false # Optional, merge pull request even when the mergeable_state is not clean. Default: false
@pythoninthegrass
pythoninthegrass / .bash_aliases
Last active May 27, 2024 17:32
Fedora Silverblue .bash_aliases
# shellcheck disable=all
# aliases
alias rsync='rsync -arvW --progress --stats --ignore-existing' # archive, recursive, verbose, whole-file
alias ll='ls -alF'
alias la='ls -A'
alias l='ls -CF'
alias c=clear
alias ..='cd ../'
alias ...='cd ../../'
@pythoninthegrass
pythoninthegrass / qr_gen.py
Last active July 27, 2026 23:28
Generate QR codes from a URL
#!/usr/bin/env -S uv run --script
# /// script
# requires-python = ">=3.13,<3.14"
# dependencies = [
# "pyqrcode>=1.2.1",
# "pypng>=0.20220715.0",
# ]
# [tool.uv]
# exclude-newer = "2026-07-31T00:00:00Z"
@pythoninthegrass
pythoninthegrass / README.md
Last active April 17, 2024 13:14
Disable external drives from automatically mounting on macOS
git clone git@gist.github.com:35b1c2781cd7a782cc521a75731b4040.git
ln -s $(pwd)/disable_automount.sh ~/.local/bin/no-mount
no-mount <DISK_NAME>
@pythoninthegrass
pythoninthegrass / game.sh
Last active June 8, 2026 21:04
sunshine, gamescope + steam
#!/usr/bin/env bash
# TODO: test wayland gamescope session
export DISPLAY=:0 # vnc
export WAYLAND_DISPLAY=:2 # xwayland
export DXVK_HDR=1
export ENABLE_GAMESCOPE_WSI=1
# Check existing X server
start_x() {
@pythoninthegrass
pythoninthegrass / README.md
Last active April 3, 2025 16:10
Ollama + Continue.dev VSCode settings

Ollama

Quickstart

# install ollama
brew install --cask ollama

# install continue.dev
code --install-extension Continue.continue
@pythoninthegrass
pythoninthegrass / set_vault_password.sh
Last active May 18, 2024 07:32
Ansible Vault w/macOS Keychain
#!/usr/bin/env bash
# $USER
[[ -n $(logname >/dev/null 2>&1) ]] && logged_in_user=$(logname) || logged_in_user=$(whoami)
# $UID
# logged_in_uid=$(id -u "${logged_in_user}")
# $HOME
logged_in_home=$(eval echo "~${logged_in_user}")
@pythoninthegrass
pythoninthegrass / resize_disk_image.md
Created April 6, 2024 06:01 — forked from joseluisq/resize_disk_image.md
How to resize a qcow2 disk image on Linux

How to resize a qcow2 disk image on Linux

This example takes olddisk.qcow2 and resizes it into newdisk.qcow2, extending one of the guest's partitions to fill the extra space.

1. qcow2 format

1.1. Verify the filesystems of olddisk.qcow2

@pythoninthegrass
pythoninthegrass / .env.example
Created March 28, 2024 23:14
Public facing version of an internal Infisical export script
BASE_URL=
ID=
SERVICE_TOKEN=
OUT_DIR=