These repository includes some miscellaneous projects generated using GPT/AI for temporary use.
Generates a truth table for user-defined Boolean expressions with multiple inputs and outputs, using the ttg and pandas libraries. It also supports output as an Excel file.
- Define custom logic expressions
- Auto-generate complete truth tables
- Save as Excel
- Sorted rows for clear interpretation
variables = ['in', 'Q11', 'Q12', 'Q21', 'Q22']
expressions = [
'in and Q12',
'in or Q12',
'in and Q22',
'(Q22 and (in or Q21))',
'(in or Q12) xor ((Q22 and (in or Q21)))'
]truth_table.xlsx— Contains full truth tablestate_diagram.png— Visual transition map from a given state transition table usingGraphviz
Recursively converts images in subfolders into individual PDF files using PIL. Each subfolder is turned into a separate PDF file.
- Supports
.jpg,.jpeg,.png,.bmp,.tiff,.gif - Maintains subfolder structure
- Converts images to high-quality PDFs
- Output PDFs are named after their respective subfolders
Set the root and output folders in the script:
root_images_folder = "/path/to/images"
output_pdfs_folder = "/path/to/save/pdfs"- A PDF file for each image subfolder under the specified directory.