Skip to content

Instantly share code, notes, and snippets.

View DragaDoncila's full-sized avatar

Draga Doncila Pop DragaDoncila

View GitHub Profile
@DragaDoncila
DragaDoncila / conda_info
Created May 12, 2025 09:56
Conda output pyside2
active environment : napari-ps2
active env location : /home/ddon0001/miniconda3/envs/napari-ps2
shell level : 3
user config file : /home/ddon0001/.condarc
populated config files : /home/ddon0001/.condarc
conda version : 25.1.1
conda-build version : not installed
python version : 3.11.5.final.0
solver : libmamba (default)
@DragaDoncila
DragaDoncila / with_7901.pytb
Created May 9, 2025 07:22
Reading errors in napari
---------------------------------------------------------------------------
ModuleNotFoundError Traceback (most recent call last)
File ~/Work/napari/napari/components/viewer_model.py:1544, in ViewerModel._open_or_raise_error(self=Viewer(camera=Camera(center=(0.0, 0.0, 0.0), zoo...use_drag_gen={}, _mouse_wheel_gen={}, _keymap={}), paths=['/home/ddon0001/PhD/data/ctc_dummy/Fluo-N2DL-HeLa/01/t000.tif'], kwargs={}, layer_type=None, stack=False)
1543 try:
-> 1544 added = self._add_layers_with_plugins(
self = Viewer(camera=Camera(center=(0.0, 0.0, 0.0), zoom=1.0, angles=(0.0, 0.0, 90.0), perspective=0.0, mouse_pan=True, mouse_zoom=True, orientation=(<DepthAxisOrientation.TOWARDS: 'towards'>, <VerticalAxisOrientation.DOWN: 'down'>, <HorizontalAxisOrientation.RIGHT: 'right'>)), cursor=Cursor(position=(1.0, 1.0), scaled=True, style=<CursorStyle.STANDARD: 'standard'>, size=1.0), dims=Dims(ndim=2, ndisplay=2, order=(0, 1), axis_labels=('0', '1'), rollable=(True, True), range=(RangeTu
WARNING: Error drawing visual <Volume at 0x7f412d5f5fd0>
13:07:30 : WARNING : MainThread : Error drawing visual <Volume at 0x7f412d5f5fd0>
---------------------------------------------------------------------------
RuntimeError Traceback (most recent call last)
File ~/miniconda3/envs/opengl/lib/python3.12/site-packages/vispy/app/backends/_qt.py:928, in CanvasBackendDesktop.paintGL(self=<vispy.app.backends._qt.CanvasBackendDesktop object>)
926 # (0, 0, self.width(), self.height()))
927 self._vispy_canvas.set_current()
--> 928 self._vispy_canvas.events.draw(region=None)
self._vispy_canvas = <NapariSceneCanvas (PyQt5) at 0x7f412dc18e30>
self._vispy_canvas.events.draw = <vispy.util.event.EventEmitter object at 0x7f412d5e4140>
@DragaDoncila
DragaDoncila / npe1-plugins.json
Created February 27, 2025 04:24
List of npe1 napari plugins
[
"bbii-decon",
"beetlesafari",
"darth-d",
"devbio-napari",
"grabber-ift",
"iacs-ipac-reader",
"Image-Composer",
"Image-Part-Selecter",
"Label-Creator",
name: space-race
display_name: Space Race
visibility: public
categories: ["Annotation", "Segmentation", "Acquisition"]
contributions:
commands:
# NOTE: no longer needing `name` prepended - we do this for the developer
- command: get_reader
# contribution type is declared with command, as are the attributes of the contribution
# can be done using a discriminating union
@DragaDoncila
DragaDoncila / extending_napari_viewer.ipynb
Last active June 29, 2022 16:14
Extending the napari viewer with a widget, mousebinding and event callback
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
name: tracking-challenge-demo
channels:
- conda
dependencies:
- python=3.8
- pip
- pip:
- napari[all]
- cookiecutter
- scikit-image
{
"color": "#0074B8",
"label": "napari hub",
"logoSvg": "<svg width=\"512\" height=\"512\" viewBox=\"0 0 512 512\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\"><circle cx=\"256.036\" cy=\"256\" r=\"85.3333\" fill=\"white\" stroke=\"white\" stroke-width=\"56.8889\"/><circle cx=\"256.036\" cy=\"42.6667\" r=\"42.6667\" fill=\"white\"/><circle cx=\"256.036\" cy=\"469.333\" r=\"42.6667\" fill=\"white\"/><path d=\"M256.036 28.4445L256.036 142.222\" stroke=\"white\" stroke-width=\"56.8889\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/><path d=\"M256.036 369.778L256.036 483.556\" stroke=\"white\" stroke-width=\"56.8889\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/><circle cx=\"71.2838\" cy=\"149.333\" r=\"42.6667\" transform=\"rotate(-60 71.2838 149.333)\" fill=\"white\"/><circle cx=\"440.788\" cy=\"362.667\" r=\"42.6667\" transform=\"rotate(-60 440.788 362.667)\" fill=\"white\"/><path d=\"M58.967 142.222L157.501 199.111\" stroke=\"white\" stroke-width=\"56.8889\" stroke-linecap=\"rou
{
"schemaVersion": 1,
"label": "hello",
"message": "my-napari-plugin",
"color": "orange"
}
@DragaDoncila
DragaDoncila / knn_classify.py
Last active November 24, 2020 04:34
Code plotting confusion matrix for classifier
from matplotlib.colors import ListedColormap
from sklearn import neighbors
from imblearn.under_sampling import RandomUnderSampler
from sklearn.model_selection import cross_val_score
from sklearn.metrics import confusion_matrix
import itertools
import pandas as pd
import os
import re