Programming
Languages, tools, and concepts for software development.
Tips โ
TIP
It's always a good idea to create your own account separately from an admin account. Good safety recommendations
TIP
To prevent spam in your main mailbox, create a catch-all email on a custom domain for logins where you don't want to receive mail from.
Background โ
History โ
Terminology โ
| Term | Definition |
|---|---|
| 8-bit color | Color depth using 8 bits per pixel (256 colors) |
| Kernel | Core of an operating system, manages hardware and system resources |
| Daemon | Background process that runs without user interaction |
| RegEx | Pattern matching language for searching and manipulating text |
| Big O Notation | Describes the upper bound of an algorithm's time or space complexity |
Slashes โ
Forward slashes (/) are the standard in most cross-platform development tools. Backslashes (\) are traditional in Windows path notation.
For best compatibility, choose forward slashes:
- Git internally uses forward slashes regardless of platform
- Forward slashes work consistently across operating systems
- Most Git documentation and examples use forward slashes
- Reduces potential escape character issues in command-line operations
Languages โ
Artistic Languages โ
- Processing
C++ โ
Lua โ
Python โ
Copy all images from folder and child folders โ
python
import os
import shutil
def copy_images_and_parent_folder(source_folder, destination_folder):
if not os.path.exists(destination_folder):
os.makedirs(destination_folder)
for root, dirs, files in os.walk(source_folder):
for file in files:
if file.lower().endswith(('.png', '.jpg', '.jpeg', '.gif', '.bmp')):
source_path = os.path.join(root, file)
destination_path = os.path.join(destination_folder, file)
shutil.copy2(source_path, destination_path)
print(f"Copied {file} to {destination_folder}")
source_folder_path = "/path/to/your/source/folder"
destination_folder_path = "/path/to/your/destination/folder"
copy_images_and_parent_folder(source_folder_path, destination_folder_path)