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 --quiet --script | |
| # /// script | |
| # requires-python = ">=3.12" | |
| # dependencies = [ | |
| # "hive-nectar", | |
| # "rich", | |
| # ] | |
| # | |
| # /// |
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
| #!/bin/bash | |
| # Hive Engine Sync Checker | |
| # Checks correct sync status using lastParsedHiveBlockNumber vs Hive Head Block | |
| # Configuration | |
| # Can be overridden by environment variables: HE_NODE, HIVE_NODE, WARN_THRESHOLD, ERROR_THRESHOLD | |
| HE_NODE="${HE_NODE:-https://engine.thecrazygm.com}" | |
| HIVE_NODE="${HIVE_NODE:-https://api.hive.blog}" |
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
| #!/bin/bash | |
| # Configuration | |
| INTERVAL=5 | |
| # AUTO-DETECT: Check for pigz first (fast mode), then mongorestore (slow mode) | |
| PID=$(pgrep -x "pigz" | head -n 1) | |
| PROC_NAME="pigz" | |
| if [ -z "$PID" ]; then |
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 | |
| from datetime import date, datetime, timezone | |
| SYNODIC_MONTH = 29.530588853 # days | |
| REF_JD = 2460969.8506944445 # Julian Day number at new moon (2025-10-21 08:25 UTC) | |
| def _julian_day(dt_utc: datetime) -> float: | |
| """Convert a UTC datetime to Julian Day.""" | |
| y, m = dt_utc.year, dt_utc.month |
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 | |
| import argparse | |
| def generate_key_square(key): | |
| """Generates a 5x5 Playfair key square.""" | |
| key = key.upper().replace("J", "I") | |
| alphabet = "ABCDEFGHIKLMNOPQRSTUVWXYZ" | |
| square = [] |
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 | |
| import argparse | |
| def beaufort_cipher(text, key): | |
| """ | |
| Applies the Beaufort cipher to a given text using a given key. | |
| The Beaufort cipher is reciprocal, so the same process handles | |
| encryption and decryption. |
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 | |
| import argparse | |
| def vigenere_cipher(text, key, decrypt=False): | |
| """ | |
| Encrypts or decrypts a given text using the Vigenere cipher with a given key. | |
| Handles both uppercase and lowercase letters, preserving case. | |
| Non-letter characters are left unchanged. | |
| :param text: The text to be encrypted or decrypted. |
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 | |
| import argparse | |
| def rot13_cipher(text): | |
| """ | |
| Applies the ROT13 cipher to a given text. | |
| ROT13 is a Caesar cipher with a fixed shift of 13. | |
| It is reciprocal: applying it again decrypts the text. | |
| Handles both uppercase and lowercase letters, preserving case. |
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 | |
| import argparse | |
| def caesar_cipher(text, shift, decrypt=False): | |
| """ | |
| Applies the Caesar cipher to a given text with a given shift. | |
| Handles both uppercase and lowercase letters, preserving case. | |
| Non-letter characters are left unchanged. | |
| :param text: The text to be processed. |
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 --quiet --script | |
| # /// script | |
| # requires-python = ">=3.12" | |
| # dependencies = [ | |
| # "hive-nectar", | |
| # "rich", | |
| # ] | |
| # | |
| # /// | |
| """ |
NewerOlder