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
#include <cooperative_groups.h> | |
#include <fmt/core.h> | |
#include <lodepng.h> | |
#include <cmath> | |
#include <cstdio> | |
#include <limits> | |
#include <memory> | |
#include <random> |
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 | |
""" | |
Build a wrapped mamba environment | |
Mamba is used to install a package, but then only the parts of the mamba | |
environment that come from that package are mirrored into a parent | |
directory structure. This allows you to use mamba to create and manage | |
the environment, without completely clobbering every other version of | |
every dependency that might already exist on the users PATH. |
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
/annlib/include/ANN/ANN.h | |
/annlib/include/ANN/ANNperf.h | |
/annlib/include/ANN/ANNx.h | |
/annlib/src/bd_tree.h | |
/annlib/src/kd_fix_rad_search.h | |
/annlib/src/kd_pr_search.h | |
/annlib/src/kd_search.h | |
/annlib/src/kd_split.h | |
/annlib/src/kd_tree.h | |
/annlib/src/kd_util.h |
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 | |
# /// script | |
# requires-python = ">=3.11" | |
# dependencies = [ | |
# "requests", | |
# ] | |
# /// | |
import os | |
import sys |
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
# conda create -n test1 python=3.9 | |
# conda activate test1 | |
# conda install -c conda-forge cctbx dxtbx | |
# python | |
from matplotlib import pyplot as plt | |
import dxtbx | |
img = dxtbx.load('test.cbf') | |
plt.imshow(img.get_raw_data().as_numpy_array()) | |
plt.show() |
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
git bisect start | |
# bad: [6ea61bae2cf441e15612dc68c257797fba46312b] 1.23.0 | |
git bisect bad 6ea61bae2cf441e15612dc68c257797fba46312b | |
# good: [41b67fdd07792a6c6569341d980ec60c1456c2d7] 1.20.0 | |
git bisect good 41b67fdd07792a6c6569341d980ec60c1456c2d7 | |
# bad: [7a198ce4a319234ae17a646fb46fe428a154f4dd] Update zigbee-herdsman to 0.13.164 (#9385) | |
git bisect bad 7a198ce4a319234ae17a646fb46fe428a154f4dd | |
# good: [4125ae08888abd697f475ce5d5562a1d1a7de637] TypeScript refactoring (#8567) | |
git bisect good 4125ae08888abd697f475ce5d5562a1d1a7de637 | |
# bad: [7ccf781b65e2b37928cde2cd4a21d03ddb1643cb] Update zigbee-herdsman-converters to 14.0.264 (#9003) |
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
#[[.md: | |
# ArchiveTarget.cmake | |
Utility function for saving a commit ID on build, then archiving the | |
output target once it has been built. Designed to make it slightly | |
harder to accidentally delete fpga-build targets, which generally have a | |
minumum compile time of ~2 hours. | |
Usage: |
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
""" | |
DIALS .refl file loader | |
This loads msgpack-type DIALS reflection files, without having DIALS or | |
cctbx in the python environment. | |
Note: All modern .refl files are at time of writing msgpack-based. Some | |
much older files might be in pickle format, which this doesn't read. | |
Usage: |
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 | |
from __future__ import absolute_import, division, print_function | |
""" | |
Watcher | |
Implementation of a utility class to efficiently watch a folder/tree of | |
folders for new files appearing, with options for ignoring/timeout. | |
""" |
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
re.compile(""" | |
% # Percent | |
(?:\((?P<mapping>[^)]*)\))? # Mapping key | |
(?P<flag>[#0\-+ ])? # Conversion Flag | |
(?P<width>\*|\d+)? # Field width | |
(?P<precision>\.(?:\*?|\d*))? # Precision | |
[hlL]? # Unused length modifier | |
(?P<format>[diouxXeEfFgGcrsa%]) # Conversion type |
NewerOlder