Based on: GitHub Flow + Conventional Commits + Squash Merge + Semantic Versioning
- One permanent branch:
main - All work in short-lived branches
مشخصات زبان برنامهنویسی Go
| import sys | |
| from pathlib import Path | |
| import vtkmodules.all as vtk | |
| from PySide6.QtWidgets import QApplication, QMainWindow | |
| from vtkmodules.qt.QVTKRenderWindowInteractor import QVTKRenderWindowInteractor | |
| IMAGE_PATH = "test.png" |
| #!/usr/bin/env bash | |
| SCRIPTPATH="$( cd -- "$(dirname "$0")" >/dev/null 2>&1 ; pwd -P )" | |
| cd "$SCRIPTPATH" | |
| for dir in */ ; do | |
| echo "$dir" | |
| cd "$SCRIPTPATH/$dir" |
| # Python 3 - Encrypt/Decrypt using AES 256 | |
| # pip install pycryptodome | |
| # Crypto.__version__ == 3.20.0 | |
| import base64 | |
| import hashlib | |
| from Crypto.Cipher import AES | |
| from Crypto.Random import get_random_bytes |
| class ImageCropper: | |
| @staticmethod | |
| def crop(image, x, y, width, height): | |
| try: | |
| image_width = image.shape[1] | |
| image_height = image.shape[0] | |
| x = max(0, min(image_width - 1, x)) | |
| y = max(0, min(image_height - 1, y)) |