utils.rs
// I need the function to be inside a module
// in order to be able to mock it in tests
mod utils {
pub fn foo() {}
#[cfg(test)]
mod tests {utils.rs
// I need the function to be inside a module
// in order to be able to mock it in tests
mod utils {
pub fn foo() {}
#[cfg(test)]
mod tests {| /// A trait, that implements common methods for all entity kinds | |
| pub trait Entity { | |
| /// Entity kind | |
| fn kind(&self) -> EntityKind; | |
| /// The ID of the entity | |
| fn id(&self) -> &str; | |
| /// The ID of the entity's parent ([`Patient`] for [`Study`], [`Study`] for [`Series`], | |
| /// [`Series`] for [`Instance`]. [`None`] if the Entity does not have a parent (e.g. is a |
| #!/bin/sh | |
| GREEN="\033[0;32m" | |
| RED="\033[0;31m" | |
| RESET="\033[0m" | |
| echo_ok() { | |
| echo -e "${GREEN}$@${RESET}" | |
| } |
| apt install xsel lastpass-cli build-essential | |
| brew install gcc | |
| brew install neovim tmux direnv pyenv pipx pass git curl stow fzf exa findutils the_silver_searcher bash-completion@2 zaquestion/tap/lab postgresql rabbitmq |
| class Elastix < Formula | |
| desc "Toolbox for rigid and nonrigid registration of images" | |
| homepage "http://elastix.isi.uu.nl/index.php" | |
| url "https://github.com/SuperElastix/elastix/releases/download/4.9.0/elastix-4.9.0-linux.tar.bz2" | |
| sha256 "7120b9f4ed3f05f734f6dcd258d36ec126d9d547766b6b3c0c60fc50b8f196e4" | |
| def install | |
| prefix.install "LICENSE", "NOTICE", "bin", "lib" | |
| end |
| CC="$(brew --prefix gcc)/bin/gcc-12" \ | |
| CFLAGS="-I$(brew --prefix glibc)/include -I$(brew --prefix readline)/include -I$(brew --prefix zstd)/include -I$(brew --prefix libffi)/include -I$(brew --prefix bzip2)/include -I$(brew --prefix sqlite)/include -I$(brew --prefix zlib)/include -I$(brew --prefix openssl)/include -I$(brew --prefix xz)/include -I$(brew --prefix tcl-tk)/include" \ | |
| CPPFLAGS="-I$(brew --prefix glibc)/include -I$(brew --prefix readline)/include -I$(brew --prefix zstd)/include -I$(brew --prefix libffi)/include -I$(brew --prefix bzip2)/include -I$(brew --prefix sqlite)/include -I$(brew --prefix zlib)/include -I$(brew --prefix openssl)/include -I$(brew --prefix xz)/include -I$(brew --prefix tcl-tk)/include" \ | |
| LDFLAGS="-L$(brew --prefix glibc)/lib -L$(brew --prefix readline)/lib -L$(brew --prefix zstd)/lib -L$(brew --prefix zlib)/lib -L$(brew --prefix openssl)/lib -L$(brew --prefix bzip2)/lib -L$(brew --prefix sqlite)/lib -L$(brew --prefix libffi)/lib -L$(brew --prefix xz)/lib -L$(brew -- |
| (0008,0050)|Accession Number|Z | |
| (0018,4000)|Acquisition Comments|X | |
| (0040,0555)|Acquisition Context Sequence|X | |
| (0008,0022)|Acquisition Date|X/Z | |
| (0008,002A)|Acquisition DateTime|X/D | |
| (0018,1400)|Acquisition Device Processing Description|X/D | |
| (0018,9424)|Acquisition Protocol Description|X | |
| (0008,0032)|Acquisition Time|X/Z | |
| (0040,4035)|Actual Human Performers Sequence|X | |
| (0010,21B0)|Additional Patient's History|X |
| ### Keybase proof | |
| I hereby claim: | |
| * I am Ch00k on github. | |
| * I am ch00ki (https://keybase.io/ch00ki) on keybase. | |
| * I have a public key whose fingerprint is 2441 05A3 C969 6A84 EACC 8F0D EEB7 521F 1FBF 0406 | |
| To claim this, I am signing this object: |
| import logging | |
| d = {'foo': 42} | |
| def log_if_none(message): | |
| logging.warning(message) | |
| foo = d.get('foo', log_if_none("No key foo")) | |
| bar = d.get('bar', log_if_none("No key bar")) | |
| baz = d.get('baz', log_if_none("No key baz")) |