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 torch | |
| import torch.nn.functional as F | |
| import einops | |
| import eulerangles | |
| def sample_volume_fft(volumes: torch.Tensor, slice_coords: torch.Tensor): | |
| if volumes.ndim == 3: # add batching dim | |
| volumes = einops.rearrange(volumes, 'z y x -> 1 z y x') | |
| if slice_coords.ndim == 3: # add batching dim |
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
| # activate parakeet dependencies | |
| module load GPUmodules | |
| module load CUDA/11.1.1-GCC-10.2.0 | |
| module load gcc/7.2.0 | |
| export CUDACXX=$(which nvcc) | |
| export CXX=$(which g++) | |
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 napari | |
| from napari.utils.events import SelectableEventedList | |
| from napari._qt.containers import QtListView, QtListModel | |
| from qtpy.QtCore import Qt, QModelIndex, QSize | |
| from qtpy.QtGui import QImage | |
| import numpy as np | |
| # simple object for our genes | |
| class MyGene: |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
| from time import sleep | |
| from enum import Enum | |
| import napari | |
| import numpy as np | |
| import psygnal | |
| from napari.qt.threading import thread_worker | |
| BOARD_SIZE = 14 | |
| INITIAL_SNAKE_LENGTH = 4 |
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
| from time import sleep | |
| import napari | |
| import numpy as np | |
| from napari.qt.threading import thread_worker | |
| viewer = napari.Viewer() | |
| bbox_layer = viewer.add_points( | |
| [[-1, -1], [-1, 1], [1, -1], [1, 1]], face_color='green') | |
| points_layer = viewer.add_points([0, 0], face_color='magenta') |
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
| def random_uniform_rotation(size=1): | |
| """ | |
| Return uniform rotation vectors sampled on a sphere | |
| Args: | |
| size : int | |
| The number of vectors | |
| Returns: | |
| vector: np.ndarray | |
| The rotation vectors | |
| """ |
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/env python | |
| from pathlib import Path | |
| import click | |
| import requests | |
| def download_pdb(accession_code: str, destination: Path): | |
| accession_code = accession_code.upper() |
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
| """ | |
| copyright: | |
| author: "Tewodros Amberbir Habtegebrial" | |
| email: "tedyhabtegebrial@gmail.com" | |
| modified by Alister Burt | |
| """ | |
| import time | |
| import torch |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.