This file contains 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
@file:Repository("https://maven.scijava.org/content/groups/public") | |
@file:DependsOn("org.janelia.saalfeldlab:n5-zarr:0.0.8") | |
import kotlin.math.ceil | |
import org.janelia.saalfeldlab.n5.zarr.N5ZarrWriter | |
import org.janelia.saalfeldlab.n5.zarr.ZArrayAttributes | |
import org.janelia.saalfeldlab.n5.zarr.ZarrCompressor | |
require(args.size == 2) { "Two arguments required, zarr group and dataset"} |
This file contains 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
[packages] | |
numba = "~=0.55" | |
matplotlib = "~=3.5" | |
[requires] | |
python_version = "3.9" |
This file contains 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
package me.hanslovsky.konkorde | |
import com.sun.jna.Library | |
import com.sun.jna.Memory | |
import com.sun.jna.Native | |
import com.sun.jna.Pointer | |
import com.sun.jna.Structure | |
interface ConcordeLib : Library { |
This file contains 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
interface Base<T: Base<T>> | |
interface Derived<T: Derived<T>> : Base<T> | |
class Impl: Derived<Impl> | |
data class Container<T>(val t: T) | |
@JvmName("f1") | |
fun <T: Base<T>> Container<T>.someFunc(c: Container<T>) = | |
println("generic: $c") | |
@JvmName("f2") | |
fun Container<out Derived<*>>.someFunc(c: Container<out Derived<*>>) = |
This file contains 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
[[source]] | |
url = "https://pypi.org/simple" | |
verify_ssl = true | |
name = "pypi" | |
[packages] | |
imglyb = "~=2.0" | |
jupyter = "~=1.0" | |
matplotlib = "~=3.4" | |
pillow = "~=8.4" |
This file contains 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
#!/usr/bin/env kscript | |
// requires kscript: https://github.com/holgerbrandl/kscript | |
// install jep native libraries with | |
// python -m pip install jep | |
// When using Python interpreter in a a non-standard location, set PYTHONHOME appropriately. | |
@file:MavenRepository("scijava", "https://maven.scijava.org/content/groups/public") | |
@file:DependsOn("net.imglib2:imglib2-cache:1.0.0-beta-16") | |
@file:DependsOn("net.imglib2:imglib2:5.12.0") |
This file contains 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
import java.lang.Class | |
import java.lang.Thread | |
import java.util.concurrent.Callable | |
import java.util.concurrent.ExecutorService | |
import java.util.concurrent.Executors | |
import jep.Interpreter | |
import jep.SharedInterpreter | |
class ThreadsafeInterpreter2( |
This file contains 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
#!/usr/bin/env python3.9 | |
from functools import reduce | |
from pathlib import Path | |
from subprocess import check_output | |
import re | |
m2_repo = Path.home() / '.m2' / 'repository' |
This file contains 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
import net.imglib2.imklib.* | |
import net.imglib2.type.volatiles.* | |
import net.imglib2.type.numeric.integer.* | |
// pick any data here | |
val rawData = imklib.io.n5.openUntypedHDF5("/home/zottel/Downloads/sample_A_20160501.hdf", "volumes/raw").asUnsignedBytes() | |
val rawDataExtended = rawData.extendBorder().asInts() | |
val gradientMagnitudeData = (0..2) | |
.map { d -> LongArray(3) { if (it == d) 1 else 0 } } | |
.map { rawDataExtended[rawData + it].zeroMin - rawDataExtended[rawData - it].zeroMin } |
NewerOlder