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
# PowerShell -ExecutionPolicy RemoteSigned .\test.ps1 | |
# Stop All Scansnap processes | |
Get-Process -Name Pfu* | Stop-Process | |
Get-Process -Name Ssh* | Stop-Process | |
# Wait until all the processes stop | |
while ((Get-Process -Name Pfu*).count -gt 0) | |
{ | |
Start-Sleep -m 200 |
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
from __future__ import print_function | |
import httplib2 | |
import os | |
import io | |
from apiclient import discovery | |
from oauth2client import client | |
from oauth2client import tools | |
from oauth2client.file import Storage | |
from apiclient.http import MediaFileUpload, MediaIoBaseDownload |
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 math | |
import PyPDF2 | |
def imposition(input_file, output_file, numreqd=4): | |
pdf_file = open(input_file,'rb') | |
pdf_reader = PyPDF2.PdfFileReader(pdf_file) | |
pdf_writer = PyPDF2.PdfFileWriter() | |
numpages = pdf_reader.numPages |