CLICK ME
yes, even hidden code blocks!
print("hello world!")| # Load dry bone CT of skull into the scene and run this script to automatically segment endocranium | |
| masterVolumeNode = slicer.mrmlScene.GetFirstNodeByClass("vtkMRMLScalarVolumeNode") | |
| smoothingKernelSizeMm = 3.0 # this is used for closing small holes in the se | |
| # Compute bone threshold value automatically | |
| import vtkITK | |
| thresholdCalculator = vtkITK.vtkITKImageThresholdCalculator() | |
| thresholdCalculator.SetInputData(masterVolumeNode.GetImageData()) | |
| thresholdCalculator.SetMethodToOtsu() |
| #!/bin/sh | |
| # Sanity checks | |
| if ! [ -x "$(command -v gs)" ]; then | |
| echo "gs is not installed -> exit" | |
| exit 1 | |
| fi | |
| # Define some handy options to use with ghostscript | |
| export PDF2PDFFLAGS="-dCompatibilityLevel=1.5 -dPDFSETTINGS=/ebook -dPrinted=false -dColorConversionStrategy=/UseDeviceIndependentColor -dDownsampleColorImages=true -dDownsampleGrayImages=true -dDownsampleMonoImages=true -dMaxSubsetPct=100 -dSubsetFonts=true -dEmbedAllFonts=true -dOptimize=true -dUseFlateCompression=true -dNOPAUSE -dBATCH -sDEVICE=pdfwrite" |
| # | |
| # 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 | |
| # |
| """ | |
| Minimal character-level Vanilla RNN model. Written by Andrej Karpathy (@karpathy) | |
| BSD License | |
| """ | |
| import numpy as np | |
| # data I/O | |
| data = open('input.txt', 'r').read() # should be simple plain text file | |
| chars = list(set(data)) | |
| data_size, vocab_size = len(data), len(chars) |