docker run -it -u $(id -u):$(id -g) -w $PWD -v /mnt:/mnt pangyuteng/dcm:latest bash
apt-get install wkhtmltopdf
pip install imgkit,pdfkit,jinja2
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
.env | |
*.nii.gz | |
tmp |
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 sys,os | |
import tensorflow as tf | |
import numpy as np | |
from tensorflow.python.estimator.model_fn import ModeKeys as Modes | |
tf.logging.set_verbosity(tf.logging.INFO) | |
w = 512 | |
h = 512 | |
d = 300 | |
c = 11 |
Sample code to run DAG jobs with python asyncio and aiohttp libraries.
example DAG
D______
A _/ C \
\_/ \_E__\_F
\ /
B
work-in-progress data source abstraction architecture/design pattern
#### Data source abtraction layer
class FileStore
def write
def read
def remove
use the share option in CVAT per davidblom cvat-ai/cvat#203
update CVAT docker-compose.yml to follow the below, where /home/david/shared_data
is the local share.
version: "2.3"
services:
cvat:
volumes:
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
# | |
# ref https://github.com/tebeka/pythonwise/blob/master/docker-miniconda/Dockerfile | |
# | |
# miniconda vers: http://repo.continuum.io/miniconda | |
# sample variations: | |
# Miniconda3-latest-Linux-armv7l.sh | |
# Miniconda3-latest-Linux-x86_64.sh | |
# Miniconda3-py38_4.10.3-Linux-x86_64.sh | |
# Miniconda3-py37_4.10.3-Linux-x86_64.sh | |
# |
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
#!/usr/bin/env/python | |
# | |
# More of a reference of using jinaj2 without actual template files. | |
# This is great for a simple output transformation to standard out. | |
# | |
# Of course you will need to "sudo pip install jinja2" first! | |
# | |
# I like to refer to the following to remember how to use jinja2 :) | |
# http://jinja.pocoo.org/docs/templates/ | |
# |
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
cmake_minimum_required(VERSION 3.5) | |
# Find python and Boost - both are required dependencies | |
find_package(PythonLibs 2.7 REQUIRED) | |
find_package(Boost COMPONENTS python REQUIRED) | |
# Without this, any build libraries automatically have names "lib{x}.so" | |
set(CMAKE_SHARED_MODULE_PREFIX "") | |
# Add a shared module - modules are intended to be imported at runtime. |
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
cmake_minimum_required(VERSION 3.5) | |
project(_hello) | |
# Find python and Boost - both are required dependencies | |
find_package(PythonLibs REQUIRED) | |
find_package(PythonInterp REQUIRED) | |
find_package(PythonExtensions REQUIRED) | |
find_package(Cython REQUIRED) | |
find_package(ZLIB REQUIRED) |