Skip to content

Instantly share code, notes, and snippets.

View ptschandl's full-sized avatar

ptschandl ptschandl

  • Medical University of Vienna
  • Vienna
View GitHub Profile
@rubo77
rubo77 / 00_local_excludes
Last active July 7, 2022 16:47
/etc/aide/aide.conf.d/00_local_excludes exclude file with all folders, that frequently change
!/backup*
!/dev/disk/
!/etc/.etckeeper
!/etc/.git/
!/etc/aide/.aide.conf.swp
!/etc/aide/.aide.conf.swp
!/etc/aide/aide.conf.d/00_local_excludes
!/etc/ld.so.cache
!/etc/lvm/archive
!/etc/lvm/backup
@petebankhead
petebankhead / QuPath-Merge unmixed files to pyramid.groovy
Last active March 6, 2024 08:12
QuPath script to merge multiple TIFF fields of view to write a single pyramidal OME-TIFF (requires QuPath v0.2.0)
/**
* Convert TIFF fields of view to a pyramidal OME-TIFF.
*
* Locations are parsed from the baseline TIFF tags, therefore these need to be set.
*
* One application of this script is to combine spectrally-unmixed images.
* Be sure to read the script and see where default settings could be changed, e.g.
* - Prompting the user to select files (or using the one currently open the viewer)
* - Using lossy or lossless compression
*
Scripts that are complex enough not to fit in any of the other simple categories.
TOC
Affine transform objects between images.groovy - used with the Align images experimental tool in v0.2.0m1
Background staining check - Takes annotations, expands an area around them, checks the staining level in that area,
then deletes all expanded areas and any original areas that violate some condition. Can help check for staining artifacts.
Classifier with GUI.groovy - User interface based macro to simplify classifying many possible channels. Also generates all
possible combinations of base classes (double, triple, etc positives).
@petebankhead
petebankhead / QuPath-Exporting annotations as labelled images.groovy
Created March 14, 2018 23:01
Script to export pixels & annotations for whole slide images, optionally with tiling.
/**
* Script to export pixels & annotations for whole slide images.
*
* The image can optionally be tiled during export, so that even large images can be exported at high resolution.
* (Note: In this case 'tiled' means as separate, non-overlapping images... not a single, tiled pyramidal image.)
*
* The downsample value and coordinates are encoded in each image file name.
*
* The annotations are exported as 8-bit labelled images.
* These labels depend upon annotation classifications; a text file giving the key is written for reference.
$ cat ~/anaconda3/envs/tensorflow_p27/etc/conda/activate.d/activate.sh
#!/bin/sh
export KERAS_BACKEND='tensorflow'
cp ~/.keras/keras_tensorflow.json ~/.keras/keras.json
export LD_LIBRARY_PATH=/usr/local/cuda-9.0/lib64:/usr/local/cuda-9.0/extras/CUPTI/lib64:/lib/nccl/cuda-9:$LD_LIBRARY_PATH_WITHOUT_CUDA
Scripts mostly taken from Pete, and also from the forums. For easy access and reference.
TOC
Alignment: Several scripts to assist in alignment as of M9. Store scripts make files using the Affine transformation while
TransferObjects uses the stored file in the Affine folder with the current image name to move objects into it.
The final result is that one set of files can be generated for the transforms, and those transforms can be accessed to move objects
back and forth between the images.
Change annotations into Cell objects.groovy - Converts annotations into PathCellObjects, which allows certian functions to work within
@DanaCase
DanaCase / AperioToQuPath.groovy
Last active May 6, 2023 09:05
Convert Exported Aperio Image Scope Annotations to QuPath Annotations
import qupath.lib.scripting.QP
import qupath.lib.geom.Point2
import qupath.lib.roi.PolygonROI
import qupath.lib.objects.PathAnnotationObject
import qupath.lib.images.servers.ImageServer
//Aperio Image Scope displays images in a different orientation
def rotated = true
@cmoulton
cmoulton / URLSession Calls in Swift 4
Last active December 18, 2023 02:31
URLSession Calls in Swift 4
func makeGetCall() {
// Set up the URL request
let todoEndpoint: String = "https://jsonplaceholder.typicode.com/todos/1"
guard let url = URL(string: todoEndpoint) else {
print("Error: cannot create URL")
return
}
let urlRequest = URLRequest(url: url)
// set up the session
@jganzabal
jganzabal / Nvidia Titan XP + MacBook Pro + Akitio Node + Tensorflow + Keras.md
Last active November 2, 2022 11:43
How to setup Nvidia Titan XP for deep learning on a MacBook Pro with Akitio Node + Tensorflow + Keras
@tombigel
tombigel / README.md
Last active July 1, 2024 02:50 — forked from a2ikm/limit.maxfiles.plist
How to Change Open Files Limit on OS X and macOS Sierra (10.8 - 10.12)

How to Change Open Files Limit on OS X and macOS

This text is the section about OS X Yosemite (which also works for macOS Sierra) from https://docs.basho.com/riak/kv/2.1.4/using/performance/open-files-limit/#mac-os-x

The last time i visited this link it was dead (403), so I cloned it here from the latest snapshot in Archive.org's Wayback Machine https://web.archive.org/web/20170523131633/https://docs.basho.com/riak/kv/2.1.4/using/performance/open-files-limit/

Mac OS X

To check the current limits on your Mac OS X system, run: