Skip to content

Instantly share code, notes, and snippets.

View adtygan's full-sized avatar
🍝
cooking something

Aditya Ganesh Kumar adtygan

🍝
cooking something
View GitHub Profile
@adtygan
adtygan / trace-process.sh
Created July 19, 2025 10:26
traces a process and its parent processes to find source user. useful in multi-user server setups.
#!/bin/bash
# -----------------------------------------------------------------------
# trace-process.sh
#
# This script traces a process and its parent processes up the process tree.
# If it encounters a containerd-shim process, it will attempt to identify
# the associated container and display container information.
#
# Usage: ./trace-process.sh <pid>
import rich
from typing import Dict, List
from rich.table import Table
from rich.console import Console
def format_percentage(value: float) -> str:
"""Format float as percentage string"""
return f"{value * 100:.2f}%"
def create_metrics_table(predictions: Dict[str, List[str]], ground_truth: Dict[str, List[str]]) -> None:
@adtygan
adtygan / deepseek-r1-distill.py
Created February 12, 2025 09:59
Loading DeepSeek-R1-Distill without quantization
import os
os.environ["CUDA_VISIBLE_DEVICES"] = "0"
import torch
from transformers import AutoModelForCausalLM, AutoTokenizer
import rich
model_name = "deepseek-ai/DeepSeek-R1-Distill-Qwen-7B"