- All non-Retina Macs
- Apple iPhone (1st generation)
- Apple iPhone 3G
- Apple iPhone 3GS
- Apple iPad (1st generation)
- Apple iPad 2
- Apple iPad mini (1st generation)
- Acer Iconia A500
This file contains 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
# Rename Files v1.1.0 | |
# Imports a mappings file in this format: | |
# current_name1,new_name1 | |
# current_name2,new_name2 | |
# ... | |
# and renames files in a MacOS directory. | |
import os | |
import shlex | |
# Ask for directory path and use shlex to sanitize the path |
This file contains 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
phi = 5**0.5*0.5+0.5 | |
formatted_phi = f"{phi:.50f}" | |
print(formatted_phi) | |
# 1.61803398874989490252573887119069695472717285156250 |
This file contains 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
# Extract Metadata v1.3.0 | |
# This script reads the images in a directory and all subdirectories, copies the EXIF metadata, and saves it to a text file with the same name as the source image. | |
import os | |
import shlex | |
from PIL import Image, ExifTags | |
# Ask the user for the parent directory path and strip trailing whitespace | |
PARENT_DIRECTORY_input = input("Enter the parent directory path: ").strip() | |
# Use shlex to sanitize the path |
This file contains 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
# Zip File v1.2.0 | |
# Usage: python zip_file.py | |
import os | |
import shlex | |
import zipfile | |
# Ask the user for the file or directory path to compress | |
source_path_input = input("Enter the file or directory path to compress: ").strip() | |
# Use shlex to sanitize the path |
This file contains 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
# Read File Path v1.0 | |
# Dreg-and-Dropping into terminal a file with spaces in its name (User/Folder/File\ Name.txt) can cause errors. | |
# This script makes sure file paths are readable by Python | |
import shlex | |
# Ask the user for a file path | |
file_path_input = input("Enter the path to the target file: ").strip() | |
file_path_components = shlex.split(file_path_input) | |
# Reconstruct the file path by joining the components |
This file contains 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
/* ---------------------------------------------------------- */ | |
/* */ | |
/* A media query that captures: */ | |
/* */ | |
/* - Retina iOS devices */ | |
/* - Retina Macs running Safari */ | |
/* - High DPI Windows PCs running IE 8 and above */ | |
/* - Low DPI Windows PCs running IE, zoomed in */ | |
/* - Low DPI Windows PCs and Macs running Firefox, zoomed in */ | |
/* - Android hdpi devices and above */ |
This file contains 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
### Points and Display Type | |
PPI is points per inch below, not pixels per inch. Not all models are listed, just the first model with a new display size. Diamond, RGB Stripe and Pentile RGB refer to the subpixel patterns. | |
iPhone 1 = 320 × 480 @ 163PPI sRGB IPS LCD RGB Stripe | |
iPhone 4 = 320 × 480 @ 163PPI sRGB IPS LCD RGB Stripe | |
iPhone 5 = 320 × 568 @ 163PPI sRGB IPS LCD RGB Stripe | |
iPhone 6 = 375 × 667 @ 163PPI sRGB IPS LCD RGB Stripe | |
iPhone 6 Plus = 414 × 736 @ 153.5PPI sRGB IPS LCD RGB Stripe | |
iPhone 7 = 375 × 667 @ 163PPI P3 IPS LCD RGB Stripe |
This file contains 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 bpy | |
print("# IMAGES") | |
for i in bpy.data.images: | |
print(i.name) | |
print("") | |
print("# COLLECTIONS") | |
for i in bpy.data.collections: |
This file contains 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 bpy | |
# GET LIST OF ALL ENABLED ADD-ONS | |
# print(bpy.context.preferences.addons.keys()) | |
modules = [ | |
'add_mesh_extra_objects', | |
'amaranth', | |
'cycles', |
NewerOlder