This file contains 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
"""Testing reading zarr file with zarr vs. dask.""" | |
import random | |
import subprocess | |
import time | |
from contextlib import contextmanager | |
import click | |
import dask.array as da | |
import numpy as np |
This file contains 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
"""Testing reading zarr file with zarr vs. dask.""" | |
import random | |
import time | |
from contextlib import contextmanager | |
import click | |
import dask.array as da | |
import numpy as np |
This file contains 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
"""Shared Memory Test Client | |
""" | |
import json | |
import sys | |
from multiprocessing.shared_memory import ShareableList | |
def client(shared_name): | |
print(f"Client: connecting to list {shared_name}") | |
shared_list = ShareableList(name=shared_name) |
This file contains 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
0 for 0.9646884955141247 seconds... | |
0 for 0.11369650717941382 seconds... | |
START | |
0 for 0.22684639879222868 seconds... | |
1 for 0.6087105797872412 seconds... | |
2 for 0.1083723869027553 seconds... | |
3 for 0.4503304613576756 seconds... | |
4 for 0.15777555608431404 seconds... | |
6 for 0.46535064391450154 seconds... | |
7 for 0.6102392954226735 seconds... |
This file contains 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 os | |
import dask.array as da | |
import time | |
import random | |
import threading | |
import numpy as np | |
data = da.random.randint(0, 255, (100,) * 3, chunks=(10,) * 3, dtype='uint8') |
This file contains 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
{ | |
"active": [ | |
"chunk_loader", | |
"vispy_rendering" | |
], | |
"trace_sets": { | |
"chunk_loader": [ | |
"napari.components.dims.Dims.set_point", | |
"napari.components.viewer_model.ViewerModel._update_layers", | |
"napari.layers.image._image_slice.ImageSlice.chunk_loaded", |
This file contains 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/env python | |
import contextlib | |
import time | |
import numpy as np | |
import dask.array as da | |
@contextlib.contextmanager | |
def perf_timer(name: str): |
This file contains 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/env python | |
import contextlib | |
import time | |
import numpy as np | |
from torchvision.datasets import MNIST | |
from torchvision import transforms | |
from torch.utils.data import Dataset | |
from torch import randn |
This file contains 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/env python | |
import contextlib | |
import time | |
import numpy as np | |
from torchvision.datasets import MNIST | |
from torchvision import transforms | |
from torch.utils.data import Dataset | |
from torch import randn |
This file contains 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/env python | |
import contextlib | |
import time | |
import numpy as np | |
from torchvision.datasets import MNIST | |
from torchvision import transforms | |
from torch.utils.data import Dataset | |
from torch import randn |
NewerOlder