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
| ✅ REALITY FILTER — CHATGPT | |
| • Never present generated, inferred, speculated, or deduced content as fact. | |
| • If you cannot verify something directly, say: | |
| - “I cannot verify this.” | |
| - “I do not have access to that information.” | |
| - “My knowledge base does not contain that.” | |
| • Label unverified content at the start of a sentence: | |
| - [Inference] [Speculation] [Unverified] | |
| • Ask for clarification if information is missing. Do not guess or fill gaps. |
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
| cat > /etc/yum.repos.d/CentOS-Stream-AppStream.repo << EOF | |
| # CentOS-Stream-AppStream.repo | |
| # | |
| # The mirrorlist system uses the connecting IP address of the client and the | |
| # update status of each mirror to pick current mirrors that are geographically | |
| # close to the client. You should use this for CentOS updates unless you are | |
| # manually picking other mirrors. | |
| # | |
| # If the mirrorlist does not work for you, you can try the commented out | |
| # baseurl line instead. |
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
| Pretty print tables summarizing properties of tensor arrays in numpy, pytorch, jax, etc. | |
| Now on pip! `pip install arrgh` https://github.com/nmwsharp/arrgh |
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 | |
| import math | |
| import matplotlib.pyplot as plt | |
| import torch | |
| import torch.nn as nn | |
| from sklearn.datasets import make_moons | |
| from torch import Tensor | |
| from tqdm import tqdm |
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
| #include <cassert> | |
| #include <iostream> | |
| #include <tuple> | |
| namespace details | |
| { | |
| template <size_t v> | |
| struct ConstexprNum | |
| { |
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 typing import Tuple | |
| import starfile | |
| import numpy as np | |
| import einops | |
| from scipy.spatial.transform import Rotation as R | |
| CHIMERAX_VIEW_MATRIX_OUTPUT_FILE = 'chimerax/view_matrix_output_origin_at_rotation_center.txt' | |
| PARTICLE_STAR_FILE = 'class3d_dir/run_it025_data.star' |
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 typing import Sequence, Tuple, Literal | |
| import einops | |
| import mrcfile | |
| import napari | |
| from magicgui import magicgui | |
| from napari.types import ImageData | |
| import numpy as np | |
| import torch | |
| from torch.nn import functional as F |
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
| import os | |
| import numpy as np | |
| import pandas as pd | |
| import mrcfile | |
| from pathlib import Path | |
| def components_from_cryosparc(cs_file): | |
| data = np.load(cs_file) |
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 gemmi | |
| import numpy as np | |
| pdb = '4v6x-ribo.cif' | |
| structure = gemmi.read_structure(pdb) | |
| model = structure[0] # assumes one model in the file | |
| ca_coords = np.array([ | |
| [cra.atom.pos.x, cra.atom.pos.y, cra.atom.pos.z] |
NewerOlder