docker pull ghcr.io/rocker-org/verse:4.3.3
docker run --rm -ti ghcr.io/rocker-org/verse:4.3.3 bash
quarto create project book abook
cd abook
## I turned off PDF rendering in _quarto.yml because lots of deps
quarto render
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
| # create ssh key (replace with your email address): | |
| ssh-keygen -t ed25519 -C "[email protected]" | |
| # show public ssh key: | |
| cat ~/.ssh/id_ed25519.pub | |
| # copy the public key to Github |
https://stackoverflow.com/a/68370063
squeue -u $USER -h -t pending,running -r -O "state" | uniq -c
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
| all: clean-docker clean-spotify | |
| clean-docker: | |
| # https://stackoverflow.com/questions/39878939/docker-filling-up-storage-on-macos | |
| docker system prune -a --volumes | |
| clean-spotify: | |
| # https://www.alphr.com/clear-spotify-cache/ | |
| rm -rf ~/Library/Caches/com.spotify.client/* |
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
| image: python:3 # use a Docker container with Python 3 | |
| before_script: # commands that should run before each job | |
| # here, we install all the packages needed for mkdocs, using pip | |
| - pip install mkdocs | |
| - pip install mkdocs-material | |
| - pip install pygments | |
| - pip install pymdown-extensions | |
| pages: # gitlab pages allows to publish static websites | |
| stage: deploy # tells gitlab to deploy the website | |
| script: # commands that are executed inside the container: |
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 http://handbook.datalad.org/en/latest/basics/101-138-sharethirdparty.html | |
| git annex initremote keeper type=external externaltype=rclone chunk=50MiB encryption=none target=<rclone_remote_name> |
git clone [email protected]:YOUR-USERNAME/YOUR-FORKED-REPO.git
cd into/cloned/fork-repo
git remote add upstream git://github.com/ORIGINAL-DEV-USERNAME/REPO-YOU-FORKED-FROM.git
git fetch upstream
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
| """Masked-ness score by source and derivative zero count ratio for images.""" | |
| import numpy as np | |
| import nibabel as nb | |
| INPUT = "/path/to/image.nii.gz" | |
| # ============================================================================= | |
| def maskedness_score(img): |
NewerOlder