Skip to content

Instantly share code, notes, and snippets.

View jeesay's full-sized avatar

jeesay

  • University of Bordeaux
  • Bordeaux
View GitHub Profile
ramachandran_sse = [
[2,4,4,4,4,4,4,4,4,4,4,2,2,2,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,2],
[2,4,4,4,4,4,4,4,4,4,4,4,2,2,2,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,2,2],
[2,4,4,4,4,4,4,4,4,4,4,4,2,2,2,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,1,1,2,2,2],
[2,2,4,4,4,4,4,4,4,4,4,4,4,2,2,2,2,1,1,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,2,2],
[2,2,4,4,4,4,4,4,4,4,4,4,4,4,2,2,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,2],
[2,2,4,4,4,4,4,4,4,4,4,4,4,2,2,2,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,2],
[2,2,2,4,4,4,4,4,4,4,4,4,2,2,2,2,1,1,1,0,0,0,1,1,1,1,1,1,0,0,0,0,0,1,1,2],
[2,2,2,2,4,4,4,4,4,4,4,2,2,2,2,2,2,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,1,1,2],
[2,2,2,2,2,4,2,2,4,2,2,2,2,2,2,2,2,1,1,1,1,1,1,1,2,2,1,1,0,0,0,0,0,1,1,2],
#!/bin/bash
mkdir -p homework/obi/img homework/obi/docs homework/obi/dev homework/obi/pro/
mkdir -p homework/obi/pro/blast homework/obi/pro/data/insulin
ch=$(printf "A\nB\nC\nD\nE\nF")
for i in $ch
do
touch homework/obi/docs/file-$i.fastq
done
series=$(seq 1234 1255 | tail -n 10)
/*
* Calculating Magnitude and Phase from the IJ complex FFT
* Jean-Christophe Taveau
* 2022/07/20
*/
const imp = IJ.getImage();
IJ.run("FFT Options...", "fft complex");
IJ.run(imp, "FFT", "");
const power = FFT.forward(imp);
/*
* Calc Real and Imaginary Parts of a FFT
* Jean-Christophe Taveau
* 2022/07/20
*/
const imp = IJ.getImage();
const w = imp.getWidth();
const h = imp.getHeight();
// Create Output
/*
Model Bias by aligning from a reference
Jean-Christophe Taveau
2022/07/19
*/
IJ.log('\\Clear');
// Einstein
@jeesay
jeesay / nashorn_polyfill.js
Last active November 16, 2020 13:29
Polyfill of ES6 features for Nashorn JavaScript Engine in Java
/*
* Riding the Nashorn: Programming JavaScript on the JVM
* @author Niko Köbler
* @link https://www.n-k.de/riding-the-nashorn/
*/
var global = this;
var window = this;
var process = {env:{}};
Area X Y Feret Slice FeretX FeretY FeretAngle MinFeret
1 27801 295.305 159.813 210.297 1 200 197 28.393 173.381
2 13813 630.527 253.561 138.716 1 603 316 68.429 131.110
3 26863 395.943 300.883 196.023 1 397 202 90.877 182.718
4 4636 151.462 276.948 79.259 1 117 297 29.476 76.864
5 14811 661.428 433.599 165.324 1 610 500 55.349 124.369
6 26697 316.114 456.619 207.762 1 228 517 34.608 179.816
7 9249 497.359 444.529 124.680 1 496 502 84.015 105.000
8 15517 130.576 467.253 148.678 1 105 397 104.410 136.790
9 31499 236.406 622.155 221.054 1 141 574 145.879 196.000
/**
* Calc basic statistics (min, max, sum and mean) using Functional Programming in ImageJ
* Jean-Christophe Taveau
* 2019-01-30
*/
function basicStats(imp) {
// Get a two-dimensional array of pixel values
let arrays= imp.getProcessor().getFloatArray();
// Flatten 2D -> 1D Array
let pixels = [].concat.apply([],arrays);
ID filename width height type
1 blobs.gif 256 254 8-bit
2 boats.gif 720 576 8-bit
3 clown.jpg 320 200 RGB
4 gel.gif 276 476 8-bit
5 LineGraph.jpg 516 356 8-bit
Area X Y Major Minor Angle Circ. Feret %Area FeretX FeretY FeretAngle MinFeret AR Round Solidity Vertices
1 405 422.483 15.547 22.832 22.585 110.833 0.712 28.46 100 418 2 108.435 21.04 1.011 0.989 0.914 4
2 577 28.5 16.282 27.121 27.089 90.000 0.947 28.302 100 17 8 147.995 27 1.001 0.999 0.96 0
3 1155 559.324 23.077 38.484 38.213 168.464 0.925 39.661 100 542 33 33.69 38 1.007 0.993 0.965 0
4 116 877.716 17.06 17.760 8.316 90.422 0.493 20.881 100 877 4 106.699 10.915 2.136 0.468 0.856 3
5 554 503.204 22.15 26.800 26.319 96.838 0.793 33.242 100 501 6 96.911 24.855 1.018 0.982 0.917 4