Skip to content

Instantly share code, notes, and snippets.

@doantientai
doantientai / find-color-pages
Created July 20, 2021 16:17 — forked from agarciadom/find-color-pages
Small Python 2.7+ script that lists the color pages in a PDF along with their CMYK ink mixes, as computed by the 'inkcov' device in Ghostcript 9.05+. "find-color-pages file.pdf" lists the color pages and their CMYK ink mixes, "find-color-pages -c file.pdf" prints the number of color pages in the PDF and "find-color-pages -C 0.39 -B 0.04 file.pdf…
#!/usr/bin/env python
# Simple script for finding and counting the color pages in a PDF
# Copyright (C) 2013-2019 Antonio Garcia-Dominguez
# Licensed under the GPLv3
#
# This script is based on the following thread (thanks for the tip!):
#
# http://tex.stackexchange.com/questions/53493
#
@doantientai
doantientai / pytorch041_cuda92_colab.sh
Created May 20, 2020 14:23 — forked from Con-Mi/pytorch041_cuda92_colab.sh
A shell file to install CUDA 9.2 backend for PyTorch 0.4.1 on Google Colab.
#!/bin/bash
TEXT_RESET='\e[0m'
TEXT_YELLOW='\e[1;33m'
wget https://developer.nvidia.com/compute/cuda/9.2/Prod2/local_installers/cuda-repo-ubuntu1604-9-2-local_9.2.148-1_amd64
echo -e $TEXT_YELLOW
echo 'WEBGET finished..'
echo -e $TEXT_RESET