Skip to content

Instantly share code, notes, and snippets.

View Signynt's full-sized avatar

Vincenzo Mitchell Barroso Signynt

  • Cologne, Germany
View GitHub Profile
@GitMurf
GitMurf / obsidian.live-preview.css.block-ref-inline.css
Last active April 9, 2025 15:21
CSS for inline block references that works for both NEW CM6 Live Preview and also Preview Mode for both CM5 (Legacy) and CM6 (New)
:root {
/* #7159de (similar to Obsidian purple) */
--block-ref-line-color: grey;
--block-ref-line-type: solid;
--block-ref-line-size: 2px;
/* Set to "inherit" for no bg color */
--block-ref-hover-bg-color: #d4d0d026;
}
/*
@petebankhead
petebankhead / QuPath-Import binary masks.groovy
Created March 13, 2018 12:27
Script to import binary masks & create annotations (see also QuPath-Export binary masks.groovy)
/**
* Script to import binary masks & create annotations, adding them to the current object hierarchy.
*
* It is assumed that each mask is stored in a PNG file in a project subdirectory called 'masks'.
* Each file name should be of the form:
* [Short original image name]_[Classification name]_([downsample],[x],[y],[width],[height])-mask.png
*
* Note: It's assumed that the classification is a simple name without underscores, i.e. not a 'derived' classification
* (so 'Tumor' is ok, but 'Tumor: Positive' is not)
*
@juliusknorr
juliusknorr / google-location-history-to-gpx.md
Last active October 9, 2024 21:32
google-location-history-to-gpx

convert google takeout archive for location history from kml to gpx and split file into one per day

gpsbabel -i kml -f Location\ History.kml -o gpx -F out.gpx
gpsbabel -t -i gpx -f out.gpx -x track,merge,pack,split,title="ACTIVE LOG # %Y%m%d" -o gpx -F split.gpx
python2 gpxsplitter.py split.gpx
@DavidYKay
DavidYKay / simple_cb.py
Last active February 13, 2025 13:54
Simple color balance algorithm using Python 2.7.8 and OpenCV 2.4.10. Ported from: http://www.morethantechnical.com/2015/01/14/simplest-color-balance-with-opencv-wcode/
import cv2
import math
import numpy as np
import sys
def apply_mask(matrix, mask, fill_value):
masked = np.ma.array(matrix, mask=mask, fill_value=fill_value)
return masked.filled()
def apply_threshold(matrix, low_value, high_value):