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 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
@pangyuteng
pangyuteng / README.md
Last active March 24, 2024 17:29
sample affine registration with SimpleITK
@pangyuteng
pangyuteng / README.md
Last active February 13, 2024 18:46
how to access local port with an active ufw from within a container
how to access local port with an active ufw from within a container

main solution

TLDR: specify network subnet in compose file, then allow in ufw.

  • in docker-compose setup network with specified subnet.
  • in docker-compose add below to access localhost via host.docker.internal.
```
link https://www.reddit.com/r/Swimming/comments/1afzr77/personal_recipe_to_enhance_feel_of_water/
As a recreational swimmer (swimming on and off for 20+ years), here is my recipe to enhance/regain the feel of water.
+ (optional) 40 min prior swimming, drink 16oz warm 50% diluted (sugar free) gatorade.
+ pick pool with water temp (77 to 82F, opt for an indoor pool if outdoor temp is > 80F).
+ 20-30 min aerobic - freestyle.
+ 5-10 min freestyle with pedals.
+ 5-10 min norma/side dolphin kicks with fins.
@pangyuteng
pangyuteng / README.md
Last active January 29, 2024 22:50
super simple workflow rendering with css and bootstrap

sample view of demo.html

demo

@pangyuteng
pangyuteng / README.md
Last active January 6, 2024 01:52
notes on native javascript
@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: