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 PIL import Image | |
| import numpy as np | |
| def binary_to_image(bin: str, width: int, height: int): | |
| data = np.array([int(b) * 0xFF for b in bin], dtype=np.uint8) | |
| out = np.pad(data, (0, (width * height) - len(data)), 'constant') | |
| img = Image.fromarray(out.reshape((height, width))) | |
| return img |
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 enum import Enum | |
| class Color(Enum): | |
| RESET = "\033[0m" | |
| RED = "\033[31m" | |
| YELLOW = "\033[33m" | |
| GREEN = "\033[32m" | |
| BLUE = "\033[34m" |
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
| /** | |
| * @file createDesktopSC.h | |
| * @brief The additional stringEx type extends the string type and adds various functions. | |
| * @author Shotadft | |
| * @license MIT License, Copyright 2024 Shotadft. | |
| * @date 2024:08:03::20:35 | |
| */ | |
| #ifndef CREATE_DESKTOPSC_H | |
| #define CREATE_DESKTOPSC_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
| /** | |
| * @file stringEx.h | |
| * @brief The additional stringEx type extends the string type and adds various functions. | |
| * @author Shotadft | |
| * @license MIT License, Copyright 2024 Shotadft. | |
| * @date 2024:08:03::13:03 | |
| */ | |
| #ifndef STRING_EX_H | |
| #define STRING_EX_H |