nano ~/.bash_aliasesPaste this func:
| import secrets | |
| import base64 | |
| def generate_youtube_id(): | |
| """ | |
| Generates a URL-safe, 11-character string similar to YouTube video IDs. | |
| Calculates 8 bytes of entropy (64 bits) and encodes it to Base64. | |
| """ | |
| # 1. Generate 8 random bytes (64 bits) | |
| random_bytes = secrets.token_bytes(8) |
| # uv add paddlepaddle paddleocr | |
| from paddleocr import PaddleOCR | |
| def extract_text_from_image(image_path: str): | |
| ocr = PaddleOCR( | |
| lang="ro", | |
| device="cpu", | |
| use_angle_cls=False, | |
| ) |
| #!/bin/bash | |
| ############################################################################## | |
| # PDF to Optimized PNG Converter | |
| # Converts PDFs to high-contrast, sharpened PNG images | |
| # Optimized for text documents (black text on white background) | |
| # Make executable | |
| # sudo chmod +x pdf_to_png_optimizer.sh |
| { | |
| "[python]": { | |
| "editor.formatOnSave": true, | |
| "editor.codeActionsOnSave": { | |
| "source.fixAll": "explicit", | |
| "source.organizeImports": "explicit" | |
| }, | |
| "editor.defaultFormatter": "charliermarsh.ruff", | |
| }, | |
| "python-envs.defaultEnvManager": "ms-python.python:venv", |
#!/bin/bash
# systemctl --user restart wireplumber pipewire pipewire-pulse
# Change this to match your device alias (as shown in `pactl list cards`)| year = int(input("Invoice year: ")) | |
| month = int(input("Invoice month: ")) | |
| monthly_rate = float(input("Monthly rate: ")) | |
| print( | |
| f"\nYou can verify working days here: https://romania.workingdays.org/workingdays_calendar_{year}_{month}.htm" | |
| ) | |
| working_days = int(input("Working days: ")) | |
| legal_holidays = int(input("Legal holidays if they are not in weekend: ")) | |
| vacation_days = int(input("Vacation days: ")) |
| SELECT * FROM pg_type | |
| SELECT pg_type.typname AS enumtype, | |
| pg_enum.enumlabel AS enumlabel | |
| FROM pg_type | |
| JOIN pg_enum | |
| ON pg_enum.enumtypid = pg_type.oid; |
| def calcul_taxe_impozite_local(venit_net: float, anul: int): | |
| """ | |
| versiune = "2.0.0" | |
| """ | |
| minim_brute_an_val = { | |
| 2020: 2230, | |
| 2021: 2300, | |
| 2022: 2550, |
| import os | |
| import shutil | |
| fileFormat = { | |
| "Picture": [ | |
| ".jpeg", | |
| ".jpg", | |
| ".gif", | |
| ".bmp", |