Skip to content

Instantly share code, notes, and snippets.

View WellyZhang's full-sized avatar
🎯
Focusing

Chi Zhang WellyZhang

🎯
Focusing
View GitHub Profile
@WellyZhang
WellyZhang / remote_tensorboard.md
Created January 31, 2023 05:29 — forked from mrnabati/remote_tensorboard.md
Tensorboard on remote server

Running Tensorboard remotely on a server

Follow these steps to run tensorflow on remote server but see the results on local browser using port forwarding.

  • On the remote machine, run:
    tensorboard --logdir <path> --port 6006
  • On the local machine, run
@WellyZhang
WellyZhang / compress-pdf-with-gs.md
Created March 17, 2021 02:26 — forked from vibegui/compress-pdf-with-gs.md
Compress PDF files with ghostscript

This can reduce files to ~15% of their size (2.3M to 345K, in one case) with no obvious degradation of quality.

ghostscript -sDEVICE=pdfwrite -dCompatibilityLevel=1.4 -dPDFSETTINGS=/printer -dNOPAUSE -dQUIET -dBATCH -sOutputFile=output.pdf input.pdf

Other options for PDFSETTINGS:

  • /screen selects low-resolution output similar to the Acrobat Distiller "Screen Optimized" setting.
  • /ebook selects medium-resolution output similar to the Acrobat Distiller "eBook" setting.
  • /printer selects output similar to the Acrobat Distiller "Print Optimized" setting.
  • /prepress selects output similar to Acrobat Distiller "Prepress Optimized" setting.