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
@echo off | |
setlocal | |
rem Define the base folder name | |
set "baseFolder=base" | |
rem Check if the base folder exists | |
if not exist "%baseFolder%" ( | |
echo Error: The source folder "%baseFolder%" does not exist. | |
pause |
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
Public Sub DuplicateSheetBasedOnPreviousSheet() | |
Dim OldName As String | |
Dim PrevName As String | |
Dim OldNum As Integer | |
Dim NewName As String | |
OldName = ActiveSheet.Name | |
OldNum = CInt(OldName) | |
PrevName = CStr(OldNum - 1) | |
NewName = CStr(OldNum + 1) | |
ActiveSheet.Copy after:=Sheets(Sheets.Count) |
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
from PIL import Image | |
import sys | |
src = Image.open(sys.argv[1]) | |
num_x = int(sys.argv[2]) | |
num_y = int(sys.argv[3]) | |
new_x = src.size[0]/num_x | |
new_y = src.size[1]/num_y | |
for xx in range(0, num_x): |
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
from PIL import Image | |
import sys | |
src = Image.open(sys.argv[1]) | |
copies_x = int(sys.argv[2]) | |
copies_y = int(sys.argv[3]) | |
new_name = str(sys.argv[1])[:-4] + '_x' + str(copies_x) + '_y' + str(copies_y) + '.png' | |
new_x = copies_x * src.size[0] | |
new_y = copies_y * src.size[1] | |
new_image = Image.new('RGB', (new_x, new_y), color=(255,255,255)) |