This file contains hidden or 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 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 |
This file contains hidden or 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
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 |
This file contains hidden or 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/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 | |
This file contains hidden or 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 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 |
This file contains hidden or 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
# 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) |
This file contains hidden or 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
# 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 |
This file contains hidden or 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 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""" |
This file contains hidden or 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
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], |
This file contains hidden or 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
# See http://help.github.com/ignore-files/ for more about ignoring files. | |
# compiled output | |
/dist | |
/tmp | |
/out-tsc | |
# Runtime data | |
pids | |
*.pid |