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 | |
# ----------------------------------------------------------------------- | |
# 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> |
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
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: |
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
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" |