Install Napari into a conda environment and manage Python packages with Poetry.
conda env create -f environment.yml
conda activate napari-env
poetry lock
poetry install
"""Simple simulator demonstrating event-driven acquisitions with pymmcore-plus""" | |
from logging import getLogger | |
from queue import Queue | |
import random | |
import time | |
from typing import Any, Iterable | |
from pymmcore_plus import CMMCorePlus | |
from useq import MDAEvent |
def safe_round(array: npt.ArrayLike, total: int) -> np.ndarray: | |
"""Rounds an array of floats, maintaining their integer sum.""" | |
array = np.asanyarray(array) | |
# Round the array to the nearest integer | |
rounded_array: np.ndarray = np.rint(array) | |
error = total - np.sum(rounded_array) | |
if error == 0: | |
return rounded_array |
//! Demonstrates memory layout using copy and move semantics in Rust. | |
//! | |
//! # Examples | |
//! | |
//! The memory locations that you see by running this program will almost certainly be different | |
//! than what is found in the examples below. The important thing to pay attention to is the memory | |
//! location of the variable `x`. | |
//! | |
//! ```console | |
//! $ cargo run --release -- --copy |
#!/bin/bash | |
# Creates a custom Raspbian image and cross-compilation environment. | |
# | |
# USAGE: ./create_image.sh | |
# | |
# This script must be run as either root or sudo. | |
# | |
# After creating the chroot environment, the script specified in the | |
# *script* variable will be executed from within the chroot. Your | |
# custom system setup commands should be located here. For example, |