Enter this in the search box along with your search terms:
Get all gists from the user santisbon.
user:santisbon
Find all gists with a .yml extension.
extension:yml
Find all gists with HTML files.
language:html
| //ImageJ macro making a tilted movie out of stack | |
| //uses shear transform + rotation | |
| //Eugene Katrukha katpyxa at gmail.com | |
| requires("1.48h"); | |
| sTitle=getTitle(); | |
| sMovieTitle=sTitle+"_tilt_movie"; | |
| setBatchMode(true); | |
| //Dialog |
| import pandas as pd | |
| import os | |
| import re | |
| from sklearn.decomposition import PCA | |
| from microscopium import io | |
| from microscopium.preprocess import montage_stream | |
| from microscopium.preprocess import correct_multiimage_illumination | |
| from microscopium.preprocess import find_background_illumination |
| OPTS=`getopt -o p:P:T:M:s:m:h --long port:nprocs:,nthreads:,memory-limit:,socks:,monitor:,help -- "$@"` | |
| usage () { | |
| echo "usage : bash dask-cluster.sh -M memory-limit -P nprocs -T nthreads -s SOCKSPORT -m MONITORHOST -p MONITORPORT [ clientcommand ... ] " | |
| echo | |
| echo launch a transient dask cluster via SLURM. The purpose of the cluster is to run a single dask | |
| echo client. | |
| echo | |
| echo The script will setup a SOCKS proxy at localhost:SOCKSPORT on MONITORHOST to access the cluster. | |
| echo via the ssh service at MONITORHOST:MONITORPORT |
| #!/usr/bin/python3 | |
| # -*- coding: utf-8 -*- | |
| from PyQt5.QtCore import Qt | |
| from PyQt5.QtGui import QImage, QPixmap, QPalette, QPainter | |
| from PyQt5.QtPrintSupport import QPrintDialog, QPrinter | |
| from PyQt5.QtWidgets import QLabel, QSizePolicy, QScrollArea, QMessageBox, QMainWindow, QMenu, QAction, \ | |
| qApp, QFileDialog |
| import bokeh | |
| from bokeh.io import output_notebook, push_notebook | |
| output_notebook() | |
| ## | |
| import numpy as np | |
| from ipywidgets import interact, widgets | |
| from bokeh.plotting import figure, show |
| # if input image is in range 0..1, please first multiply img by 255 | |
| # assume image is ndarray of shape [height, width, channels] where channels can be 1, 3 or 4 | |
| def imshow(img): | |
| import cv2 | |
| import IPython | |
| _,ret = cv2.imencode('.jpg', img) | |
| i = IPython.display.Image(data=ret) | |
| IPython.display.display(i) |
| # https://gist.github.com/althonos/6914b896789d3f2078d1e6237642c35c | |
| [metadata] | |
| name = {name} | |
| version = file: {name}/_version.txt | |
| author = Martin Larralde | |
| author_email = [email protected] | |
| url = https://github.com/althonos/{name} | |
| description = {description} | |
| long_description = file: README.md |
| import pytest | |
| import sliplib | |
| import string | |
| from faradayio import faraday | |
| from tests.serialtestclass import SerialTestClass | |
| def test_socketOne(): | |
| """Simple test to make sure loopback serial port created successfully""" |
Enter this in the search box along with your search terms:
Get all gists from the user santisbon.
user:santisbon
Find all gists with a .yml extension.
extension:yml
Find all gists with HTML files.
language:html
| In [1]: from skimage.io import imread as skimage_imread | |
| In [2]: from matplotlib.pyplot import imread as plt_imread | |
| In [3]: from scipy.ndimage import imread as scipy_imread | |
| In [4]: skimage_imread('bulk_water_000.png') | |
| Out[4]: | |
| array([[[146, 125, 54, 255], | |
| [146, 125, 54, 255], |