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.13" | |
| # dependencies = [] | |
| # /// | |
| import logging | |
| import logging.config | |
| from contextlib import contextmanager | |
| from contextvars import ContextVar |
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
| /* | |
| * String formatting, given %s (string), %i (integer), and %f (float). The variable number of arguments are expected to | |
| * be pushed on the stack. No error handling: If the number or order of arguments does not match, Gothic will crash. | |
| * | |
| * Example usage: | |
| * | |
| * MEM_PushStringParam("Mud"); | |
| * MEM_PushIntParam(24); | |
| * castToIntf(1.2); | |
| * out = STR_Format("Hello %s, give me %i ore! That is a %f % percent increase."); |
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.13" | |
| # dependencies = [ | |
| # "cyclopts", | |
| # ] | |
| # /// | |
| import logging | |
| 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
| /* | |
| * Performance benchmark (PBM) to compare two implementations (e.g. Daedalus vs. machine code) based on MEM_Benchmark. | |
| * Adjust the implementations `pbm_impl_A` and `pbm_impl_B` and compare their performance with `pbm_run()`. | |
| */ | |
| const int pbm_loop_num = 10000; | |
| func int pbm_impl_A() { | |
| // Example: Loop that sums all numbers (Daedalus) | |
| var int sum; sum = 0; | |
| repeat(i, pbm_loop_num); var int i; |
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.13" | |
| # dependencies = [ | |
| # "cyclopts", | |
| # ] | |
| # /// | |
| import logging | |
| import re |
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
| <?xml version="1.0" encoding="UTF-8"?> | |
| <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
| <plist version="1.0"> | |
| <dict> | |
| <key>Protocol</key> | |
| <string>s3</string> | |
| <key>Vendor</key> | |
| <string>filen-s3-http</string> | |
| <key>Scheme</key> | |
| <string>http</string> |
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
| #!/usr/bin/env -S uv run --script | |
| # /// script | |
| # requires-python = ">=3.13" | |
| # dependencies = [ | |
| # "cyclopts", | |
| # "pytest", | |
| # ] | |
| # /// | |
| """Usage from command line: | |
| `./restore_from_history.py --help` or `uv run --script restore_from_history.py --help` |
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
| """ | |
| Quick plotting for testing and preliminary data visualization | |
| """ | |
| from matplotlib import pyplot as plt | |
| from matplotlib.colors import LinearSegmentedColormap | |
| import numpy as np | |
| __all__ = [ | |
| 'imshow', | |
| ] |
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
| """ | |
| Smarter bounds | |
| This function emulates set_smart_bounds of matplotlib.spines.Spine, | |
| but correctly sets the extent of the axes. | |
| """ | |
| def smarterbounds(ax, which='both'): | |
| """ |
NewerOlder