Skip to content

Instantly share code, notes, and snippets.

View pangyuteng's full-sized avatar

pangyuteng

View GitHub Profile
@pangyuteng
pangyuteng / Dockerfile
Last active April 27, 2024 16:49
conversion from stl to nifti and vice versa
FROM python:3.8-bullseye
COPY requirements.txt /tmp/requirements.txt
RUN pip install -r /tmp/requirements.txt
@pangyuteng
pangyuteng / NOTES.md
Last active May 24, 2024 08:06
DO-NOT-USE dicom multiframe to single frame conversion

So how do you split multi frame to single frame dicom images?


First you should google the current top results in google
keywords I used: "split dicom multiframe to single frame"
If you don't like the results you can check the below related links:

@pangyuteng
pangyuteng / README.md
Last active August 22, 2024 18:33
htcondor notes

if you want to submit parallel jobs with condor_submit:

condor.sub

universe = docker
docker_image = {{docker_url}}
docker_pull_policy = always
executable = {{bash_filename}}
should_transfer_files = YES
transfer_input_files = {{bash_filename}}
@pangyuteng
pangyuteng / README.md
Last active August 28, 2022 17:55
CI_COMMIT_TAG alternative
  script:
    - echo hello cicd
  rules:
    - if: "($CI_PIPELINE_SOURCE == 'pipeline' || $CI_PIPELINE_SOURCE == 'web') && $CI_COMMIT_TAG != null && $CI_COMMIT_BRANCH == 'main' "

since above rule with CI_COMMIT_TAG is only triggered when tag is pushed to gitlab, one can use the below

@pangyuteng
pangyuteng / .gitignore
Last active August 17, 2022 23:28
keras-tensorflow-onnx notes
keras_model.h5
tf_model
model.onnx
updated_tf_model
updated_keras_model.h5
@pangyuteng
pangyuteng / README.md
Last active March 13, 2025 15:38
setting up Dell Poweredge R720 + Nvidia Tesla P40 24GB
  Dell Poweredge R720
  Nvidia Tesla P40 24GB 
  GPU pass-through via Proxmox

psu

  • ? am using only one 1100w psu, the other 1100w is not plugged in.
@pangyuteng
pangyuteng / Dockerfile
Created May 14, 2022 20:35
docker nfs volume to respect default acl settings
FROM ubuntu:latest
RUN apt-get update;apt-get install acl -yq
@pangyuteng
pangyuteng / hola.py
Last active May 4, 2022 22:26
keras multi-class dice
#
# gattia commented on Apr 6, 2018
# https://github.com/keras-team/keras/issues/9395#issuecomment-379276452
#
import tensorflow as tf
from tensorflow import keras
import tensorflow.keras.backend as K
def dice_coef(y_true, y_pred, smooth=1e-7):
@pangyuteng
pangyuteng / Dockerfile
Last active March 31, 2022 21:51
docker with cron job
FROM python:3.8-slim-buster
RUN apt-get update && apt-get -y install cron
# Copy hello-cron file to the cron.d directory
COPY hello-cron /etc/cron.d/hello-cron
# Give execution rights on the cron job
RUN chmod 0644 /etc/cron.d/hello-cron
@pangyuteng
pangyuteng / lazyload.html
Created March 17, 2022 21:12
demo lazy load with call back using jquery.lazy
<!DOCTYPE html>
<html lang="en">
<head>
<style>
div.lazy {
width: 700px;
height: 467px;
background: #f2dede;
color: #a94442;