Skip to content

Instantly share code, notes, and snippets.

View pangyuteng's full-sized avatar

pangyuteng

View GitHub Profile
@pangyuteng
pangyuteng / Dockerfile
Last active November 20, 2020 01:18
my tensorflow docker base image
FROM tensorflow/tensorflow:2.2.0-gpu-jupyter
RUN python -m pip install --upgrade pip
COPY requirements.txt .
RUN pip install -r requirements.txt
@pangyuteng
pangyuteng / README.md
Created February 19, 2021 06:45
essential imaging dicom tags
META
  • Description: MediaStorageSOPClassUID Tag: (0x0002,0x0002) Level: ERROR
  • Description: MediaStorageSOPInstanceUID Tag: (0x0002,0x0003) Level: ERROR
  • Description: TransferSyntaxUID Tag: (0x0002,0x0010)
@pangyuteng
pangyuteng / email_utls.py
Created February 19, 2021 06:48
python email utils
import os
import warnings
import traceback
import smtplib
from email.mime.text import MIMEText
from email.mime.multipart import MIMEMultipart
from email.mime.application import MIMEApplication
import getpass
# email_server coule be email_server+":"+port
@pangyuteng
pangyuteng / myprofile.py
Last active April 28, 2021 00:09
profile io with asyncio
import os
import sys
import uuid
import time
import numpy as np
import asyncio
import aiofiles
from aiofiles.os import wrap
# make sure any io operations use the async version
@pangyuteng
pangyuteng / README.md
Last active April 15, 2021 00:29
nvidia clara+slicer3

server side:

ref. https://docs.nvidia.com/clara/tlt-mi/

  • get container
export workspace=/tmp/clara-experiments
mkdir -p $workspace
export dockerImage=nvcr.io/nvidia/clara-train-sdk:v3.1.01
docker pull $dockerImage
docker run --gpus=1 --shm-size=1G --ulimit memlock=-1 --ulimit stack=67108864 -it --rm -v $workspace:/workspace/clara-experiments $dockerImage /bin/bash
@pangyuteng
pangyuteng / .gitignore
Last active June 20, 2023 05:53
nifti-origin-orientation
images/*
images.zip
itk.nii.gz
ok/*
@pangyuteng
pangyuteng / Dockerfile.QT4VTK7
Last active June 3, 2024 17:36
qt+vtk Dockerfile
FROM ubuntu:18.04
RUN apt-get update && apt-get install -y --no-install-recommends \
autotools-dev \
build-essential \
ca-certificates \
cmake \
git \
wget \
unzip \
@pangyuteng
pangyuteng / CMakeLists.txt
Last active June 15, 2021 23:09
QVTKWidget vs QVTKWidget2
cmake_minimum_required(VERSION 3.0.0 FATAL_ERROR)
if(POLICY CMP0020)
cmake_policy(SET CMP0020 NEW)
endif()
PROJECT(foo)
find_package(VTK REQUIRED)
@pangyuteng
pangyuteng / README.md
Last active September 11, 2021 22:38
route browser traffic via ssh to server with vpn acccess

router setup (since server is behind router)

  • forward external port (22 or something else) to server port 22.

server setup

  • enable ssh
@pangyuteng
pangyuteng / .gitignore
Last active November 16, 2022 18:34
3d image patch extraction
**/.ipynb_checkpoints/*
ok.png
ok.nii.gz
workdir/*