The goal is to replace individual double quotes "
with single quotes '
without affecting docstring triple double quotes """
.
%s/([^"])"([^"])/$1'$2/g
####################################################################### | |
# | |
# Cambridge Crystallographic Data Centre | |
# CCDC | |
# | |
####################################################################### | |
# | |
# If this CIF has been generated directly or indirectly from an entry in the | |
# Cambridge Structural Database, then it will include bibliographic, chemical, |
####################################################################### | |
# | |
# This file contains crystal structure data downloaded from the | |
# Cambridge Structural Database (CSD) hosted by the Cambridge | |
# Crystallographic Data Centre (CCDC). | |
# | |
# Full information about CCDC data access policies and citation | |
# guidelines are available at http://www.ccdc.cam.ac.uk/access/V1 | |
# | |
# Audit and citation data items may have been added by the CCDC. |
The goal is to replace individual double quotes "
with single quotes '
without affecting docstring triple double quotes """
.
%s/([^"])"([^"])/$1'$2/g
40001: 0000110000000001 | |
40002: 0000100000000001 | |
40003: 0000000000000000 | |
40004: 0000000000000000 | |
40005: 0000000000000000 | |
40006: 0000000000000000 | |
40007: 0000000100000010 | |
40008: 0000000000011100 | |
40009: 0100001010001011 | |
40010: 0101100111101011 |
""" | |
Combine multiple images of the same size vertically. Usage: | |
python image_stacker.py path/to/img_1.jpg path/to/img_2.jpg ... img_n.jpg | |
""" | |
import sys | |
from PIL import Image | |
size = (1920, 1080 * len(sys.argv[1:])) | |
output = Image.new('RGB', size) | |
for i, image in enumerate(sys.argv[1:]): |