#!/bin/bash
# systemctl --user restart wireplumber pipewire pipewire-pulse
# Change this to match your device alias (as shown in `pactl list cards`)
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 | |
| ############################################################################## | |
| # 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 |
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
| { | |
| "[python]": { | |
| "editor.formatOnSave": true, | |
| "editor.codeActionsOnSave": { | |
| "source.fixAll": "explicit", | |
| "source.organizeImports": "explicit" | |
| }, | |
| "editor.defaultFormatter": "charliermarsh.ruff", | |
| }, | |
| "python-envs.defaultEnvManager": "ms-python.python:venv", |
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
| 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: ")) |
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
| 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; |
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
| def calcul_taxe_impozite_local(venit_net: float, anul: int): | |
| """ | |
| versiune = "2.0.0" | |
| """ | |
| minim_brute_an_val = { | |
| 2020: 2230, | |
| 2021: 2300, | |
| 2022: 2550, |
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
| import os | |
| import shutil | |
| fileFormat = { | |
| "Picture": [ | |
| ".jpeg", | |
| ".jpg", | |
| ".gif", | |
| ".bmp", |
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
| import os | |
| import subprocess | |
| input_folder = "./vids" | |
| output_folder = "./reencoded" | |
| # Create the output folder if it doesn't exist | |
| os.makedirs(output_folder, exist_ok=True) | |
| # Get a list of all the .mp4 files in the input folder |
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
| import os | |
| # Assuming video files are in this format: "1.mp4" | |
| filepaths = [f for f in os.listdir() if f.endswith(".mp4")] | |
| sorted_filepaths = sorted(filepaths, key=lambda val: int(val.split(".")[0])) | |
| allvids = [f'file {os.path.abspath(f)}' for f in sorted_filepaths] | |
| with open("vids.txt", "w") as f: | |
| f.write("\n".join(allvids)) | |
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
| import os | |
| mp4files = [f for f in os.listdir() if f.endswith(".mp4") and "ALTERED" not in f] | |
| if __name__ == "__main__": | |
| for f in mp4files: | |
| os.system(f"auto-editor {f} --no-open") |
NewerOlder