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
| % Demonstrate attempt at applying x, y offsets via PTB processing hooks. | |
| % | |
| % Instructions | |
| % ------------ | |
| % After running, press any key to advance offset position. Position will | |
| % not change until key-up event. The script will run indefinitely until the | |
| % escape key is pressed. | |
| % | |
| % Known Issues | |
| % ------------ |
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 collections.abc import Generator | |
| def collate_nibbles(upper: bytes, lower: bytes) -> Generator[int]: | |
| def to_nibbles(data: bytes) -> bytes: | |
| """Convert bytes to nibbles""" | |
| return ( | |
| nibble for byte in data for nibble in ((byte & 0xF0), (byte & 0x0F) << 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
| """Convenience module for working with grids""" | |
| import dataclasses | |
| import unittest | |
| @dataclasses.dataclass | |
| class GridPoint: | |
| x: int | |
| y: int |
OlderNewer