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
''' | |
Read a list of urls, load the pages and save as a single pdf. | |
File urls.txt must be available alongside this script. | |
After running, resulting pdf is available as 'generated.pdf' | |
''' | |
from weasyprint import HTML | |
# cli: pip3 install weasyprint | |
from PyPDF2 import PdfMerger | |
# cli: pip3 install PyPDF2 | |
from io import BytesIO |
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
/* Binary Search Plugin | |
* | |
* Find the position of an integer value in a list of integers, | |
* or else find the position where it should be inserted while keeping the list ordered. | |
* | |
* Compiling and installation as a MySQL plugin: | |
* | |
* 1) g++ -shared -o binarypos.so binarypos.cpp | |
* 2) sudo service mysql stop | |
* 3) sudo cp ./binarypos.so /usr/lib/mysql/plugin/ |