Skip to content

Instantly share code, notes, and snippets.

View pangyuteng's full-sized avatar

pangyuteng

View GitHub Profile
@pangyuteng
pangyuteng / readme.md
Last active February 5, 2026 17:47
itksnap wsl2

ITK-SNAP in WSL2 ubuntu24.04

  • download itksnap, unzip tar at ~
tar -xvf xxx.tar.gz
  • add bin folder to PATH in .bashrc
@pangyuteng
pangyuteng / README.md
Created January 30, 2026 23:07
flask gunicorn shit
@pangyuteng
pangyuteng / coding-llm-agents.md
Last active December 19, 2025 19:30
coding llm agents
@pangyuteng
pangyuteng / hola.py
Last active July 23, 2025 15:55
buffer flushing logic using python asyncio Queue and Event
"""
buffer flushing logic using python asyncio Queue and Event
"""
import numpy as np
import asyncio
entire_list = []
async def flusher(queue, max_queue_size, interval, flush_event, pool):
while True:
@pangyuteng
pangyuteng / foobar.py
Last active April 11, 2025 18:44
sample ugly csv to nifti
import time
import sys
import pandas as pd
import numpy as np
import SimpleITK as sitk
def foobar_np(source_nifti_file,source_csv_file,target_nifti_file):
df = pd.read_csv(source_csv_file) # columns,x,y,z,foo
@pangyuteng
pangyuteng / README.md
Last active February 5, 2025 02:13
prevent docker containers running as root

prevent docker containers running as root

OPTION A. [WIP] use apparmor

  • install
sudo apt install apparmor-profiles
@pangyuteng
pangyuteng / README.md
Last active January 23, 2025 16:17
gitlab cicd via kube
@pangyuteng
pangyuteng / README.md
Last active September 18, 2024 00:49
docker swarm vs kubernetes commands

my kubernetes cheatsheet/notes

incomplete* list of docker swarm command mapping to kubectl commands.

docker swarm kubernetes
docker node ls kubectl get nodes
docker stack deploy -c $YAMLFILE kubectl apply -f $YAMLFILE
docker service create ... kubectl create deploy -n $NAMESPACE $PODNAME ...
docker service inspect $SERVICENAME kubectl describe pod -n $NAMESPACE $PODNAME
@pangyuteng
pangyuteng / .dockerignore
Last active August 6, 2024 19:37
just for fun
log
@pangyuteng
pangyuteng / Dockerfile
Last active June 21, 2024 02:17
non-root docker
FROM pytorch/pytorch:2.2.2-cuda11.8-cudnn8-runtime
ARG GROUPID
ARG USERID
ARG USERNAME
RUN groupadd -g $GROUPID developer
RUN useradd --no-log-init -u $USERID -g $GROUPID -s /bin/bash $USERNAME