Skip to content

Instantly share code, notes, and snippets.

@henryiii
henryiii / LICENSE
Last active February 7, 2024 03:21
Download all pyproject.tomls
MIT License
Copyright (c) 2023 Françoise CONIL
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
@ntustison
ntustison / a_background.md
Last active April 23, 2024 23:49
ANTsX Tutorial

ANTs intro

  • ANTs --- Set of C++ programs built on top of the Insight Toolkit
  • ANTsR --- R-based ANTs interface (dependencies include ITKR, ANTsRCore)
  • ANTsPy --- Python-based ANTs interface
  • ANTsXNet --- deep learning library built on Keras
    • ANTsRNet
  • ANTsPyNet
@mingfeima
mingfeima / pytorch_channels_last_perf_optimization.md
Last active September 1, 2023 03:02
PyTorch Channels Last memory format perf optimization and oneDNN integration plan.

PyTorch Channels Last Memory Format Performance Optimization on CPU Path

("mkldnn" has been renamed to "oneDNN", but exsiting PyTorch APIs still use "mkldnn", future work will align PyTorch user level APIs to "oneDNN")

Table of Contents

  • PyTorch Channels Last memory format introduction
  • oneDNN API for NHWC layout
  • Generic Channels Last memory format optimization with ATen native
  • oneDNN NHWC integration

NB: Memory format refers to data representation that describes how multidimensional arrays (nD) are stored in linear (1D) memory address space. Memory format has the same semantic with layout in oneDNN. Layout in PyTorch has other semantic ofdescribing dense or sparse with the attributes: 'torch.strided', 'torch.sparse_coo'.

@rabernat
rabernat / zarr_over_http.ipynb
Last active July 16, 2019 18:12
Zarr over http
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@jakirkham
jakirkham / AOLLSM_ITK.ipynb
Last active July 13, 2019 21:18
Applying Richardson-Lucy Deconvolution from ITK on AOLLSM using Dask
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@dholth
dholth / wgc.py
Last active April 6, 2020 16:18
#!/usr/bin/env python
# wgc "wheel greater compression"
# puts everything but *.dist-info/ in an interior archive
import pathlib
import os.path
import sys
import hashlib
import zipfile
import base64
@N-Dekker
N-Dekker / CompareOldAndRangeBasedConstantBoundary.cxx
Last active November 7, 2018 17:19
Compares performance of "old-school" and new range-based neighborhood iteration using http://review.source.kitware.com/#/c/23795/7
/*
Compares performance of "old-school" neighborhood iteration, using
itk::ConstantBoundaryCondition, and range-based neighborhood iteration,
using the patch "WIP: Added policy for constant NeighborhoodRange values
outside image", http://review.source.kitware.com/#/c/23795/7.
Niels Dekker, LKEB, Leiden University Medical Center, 2018
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
@F21
F21 / signing-gpg-keys.md
Last active April 17, 2024 14:37
Signing someone's GPG key

This is a quick guide of the commands we use to sign someone's GPG key in a virtual key signing party.

Note: The steps cover only the technical aspects of signing someone's key. Before signing someone's key, you must verify their identity. This is usually done by showing government-issued ID and confirming the key's fingerprint

The commands will work for both GPG and GPG2.

I use Julian's key for the examples. His key id is 2AD3FAE3. You should substitute with the appropriate key id when running the commands.

Signing the key

  1. List the keys currently in your keyring: gpg --list-keys.
@linar-jether
linar-jether / dask_celery_scheduler.py
Created March 18, 2018 09:20
A dask distributed scheduler based on on Celery tasks - Allows reusing an existing celery cluster for ad-hoc computation
from __future__ import absolute_import, division, print_function
import multiprocessing
import pickle
from multiprocessing.pool import ThreadPool
from celery import shared_task
from dask.local import get_async # TODO: get better get
from dask.context import _globals
from dask.optimize import fuse, cull