sudo ln -s /data2/k3s-rancher-etc/ /etc/rancher
sudo ln -s /data2/k3s/ /run/k3s
sudo ln -s /data2/k3s-kubelet/ /var/lib/kubelet
sudo ln -s /data2/k3s-rancher/ /var/lib/rancher
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # train_grpo.py | |
| import re | |
| import torch | |
| from datasets import load_dataset, Dataset | |
| from transformers import AutoTokenizer, AutoModelForCausalLM | |
| from peft import LoraConfig | |
| from trl import GRPOConfig, GRPOTrainer | |
| # Load and prep dataset |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| -- Find indexes on the table | |
| SELECT indexname, tablename | |
| FROM pg_indexes | |
| WHERE tablename = '' || ${table_name} || ''; | |
| -- Find foreign key relationships | |
| SELECT | |
| tc.table_schema, | |
| tc.constraint_name, | |
| tc.table_name, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| curl -sfL https://get.k3s.io | sh -s - \ | |
| --bind-address=0.0.0.0 \ | |
| --flannel-iface=zt12345678 \ | |
| --node-ip=10.0.0.2 \ | |
| --cluster-init | |
| # from control plane | |
| K3S_URL=https://10.0.0.2:6443 | |
| K3S_TOKEN=$(sudo cat /var/lib/rancher/k3s/server/node-token) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| async function callDebugRpcMethod(method: string, params: any[]) { | |
| const response = await fetch("http://localhost:3030/rpc", { | |
| headers: { | |
| "content-type": "application/json", | |
| }, | |
| referrer: "http://localhost:3000/", | |
| body: JSON.stringify({ | |
| jsonrpc: "2.0", | |
| id: 1, | |
| method: method, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: pytorch | |
| channels: | |
| - https://repo.anaconda.com/pkgs/main | |
| - https://repo.anaconda.com/pkgs/r | |
| dependencies: | |
| - python=3.12.8 | |
| - cmake | |
| - ninja | |
| - libjpeg-turbo | |
| - libpng |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| macos-option-as-alt = true | |
| keybind = cmd+right=text:\x05 | |
| keybind = cmd+left=text:\x01 | |
| keybind = alt+left=esc:b | |
| keybind = alt+right=esc:f |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| set -eo pipefail | |
| user_input="$*" | |
| if [[ -z "$user_input" ]]; then | |
| user_input="beginner shell commands" | |
| echo "Using default input: $user_input" | |
| fi |