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 python3 | |
| """Spike: a reciprocal lattice viewer that behaves well over remote X. | |
| The 3D view is rendered offscreen on the machine the program runs on, read | |
| back as pixels and drawn into an ordinary wx window as an image. The X server | |
| never sees an OpenGL request. | |
| While the user is interacting (rotating, zooming, resizing, moving a slider) | |
| the scene is rendered at 1/N of the window size. That small image is what is | |
| handed to the toolkit, with a scale transform, so that the X server does the |
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 python3 | |
| """Convert Phoebus .bob to EDM .edl screen format, using DLS house style.""" | |
| import argparse | |
| import os | |
| import xml.etree.ElementTree as ET | |
| GROUP_TITLE_HEIGHT = 25 | |
| SECTION_LABEL_HEIGHT = 13 |
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 -S uv run --script | |
| # /// script | |
| # requires-python = ">=3.12" | |
| # dependencies = [ | |
| # "bs4", | |
| # "packaging", | |
| # "requests", | |
| # "rich", | |
| # "typer", | |
| # "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 <cooperative_groups.h> | |
| #include <fmt/core.h> | |
| #include <lodepng.h> | |
| #include <cmath> | |
| #include <cstdio> | |
| #include <limits> | |
| #include <memory> | |
| #include <random> |
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 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 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
| /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 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 python3 | |
| # /// script | |
| # requires-python = ">=3.11" | |
| # dependencies = [ | |
| # "requests", | |
| # ] | |
| # /// | |
| import os | |
| import sys |
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
| # 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 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
| 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 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
| #[[.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: |
NewerOlder