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 python3 | |
import re | |
import sys | |
import os | |
i3conf = os.path.expandvars("$XDG_CONFIG_HOME/i3/config") | |
def get_bindings(): |
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
%YAML 1.2 | |
--- | |
name: STAR | |
file_extensions: [star] | |
scope: source.star | |
contexts: | |
main: | |
- meta_content_scope: meta.main | |
- match: ^loop_ |
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 gc | |
import inspect | |
import torch | |
def _print_tensors(depth=2): | |
"""Print info about tensor variables locally and nonlocally.""" | |
print('='*80) | |
for obj in gc.get_objects(): | |
frame = inspect.currentframe() | |
frames = [] |
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 python3 | |
import requests | |
from io import StringIO | |
from functools import lru_cache | |
import numpy as np | |
from scipy.spatial.transform import Rotation, Slerp | |
import napari | |
from napari.settings import get_settings |
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 numpy as np | |
import pandas as pd | |
def rec2df(arr): | |
"""Unpack nested recarray into a flat dataframe.""" | |
def _unpack_recarray(arr, name=None): | |
names = arr.dtype.names | |
dct = {} |
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 python3 | |
import numpy as np | |
import pandas as pd | |
import napari | |
import mrcfile | |
from morphosamplers.sampler import ( | |
generate_1d_grid, | |
place_sampling_grids, | |
sample_volume_at_coordinates, |