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
| if filereadable(expand('$VIMRUNTIME/defaults.vim')) | |
| unlet! g:skip_defaults_vim | |
| source $VIMRUNTIME/defaults.vim | |
| endif | |
| if v:lang =~ "utf8$" || v:lang =~ "UTF-8$" | |
| set fileencodings=ucs-bom,utf-8,latin1 | |
| endif | |
| set nocompatible " Use Vim defaults (much better!) |
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 python3.7 | |
| """Calculate brain parenchymal fraction from a GIFv2 segmentation. | |
| Intracranial volume (ICV) is grey-matter + CSF + white-matter. | |
| Brain parenchymal fraction is (grey-matter + white-matter) / ICV. | |
| """ | |
| import os | |
| import subprocess |
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
| WM lesion segmentation # | |
| # # | |
| # ------------------------------- # | |
| # (c) Sergi Valverde 2019 # | |
| # Neuroimage Computing Group # | |
| # ------------------------------- # | |
| ################################################## | |
| DEBUG: 1 | |
| Using TensorFlow backend. |
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 org.w3c.dom.Document; | |
| import org.w3c.dom.Element; | |
| import org.w3c.dom.NodeList; | |
| import org.xml.sax.InputSource; | |
| import javax.xml.parsers.DocumentBuilder; | |
| import javax.xml.parsers.DocumentBuilderFactory; | |
| import java.io.FileInputStream; | |
| public class Main { |
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
| from collections import defaultdict | |
| import os.path | |
| import nibabel | |
| import numpy as np | |
| from pirec.artefacts import NiiGzImage | |
| from skimage.measure import label as sklabel | |
| def make_lesional_masks(masks): | |
| """Separate lesions to individual masks with 4D connectivity.""" |
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
| # Byte-compiled / optimized / DLL files | |
| __pycache__/ | |
| *.py[cod] | |
| *$py.class | |
| # C extensions | |
| *.so | |
| # Distribution / packaging | |
| .Python |
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
| PROJECT:= name | |
| .PHONY: check test codestyle docstyle lint pip | |
| check: test codestyle docstyle lint | |
| test: | |
| py.test --cov=$(PROJECT) tests | |
| codestyle: |
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 codecs | |
| import os.path | |
| from setuptools import find_packages, setup | |
| NAME = '' | |
| with codecs.open(os.path.join(NAME, 'VERSION'), encoding='utf-8') as f: | |
| version = f.read().strip() | |
| with codecs.open('README.rst', encoding='utf-8') as f: | |
| long_description = f.read() |
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
| zfs list -t snapshot -H -o name | grep "201509[0-9].*" | xargs -n1 echo | |
| # zfs list -t snapshot -H -o name | grep "201509[0-9].*" | xargs -n1 zfs destroy |