This file contains hidden or 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 PyPDF2 | |
def transfer_annotations(src_pdf, dest_pdf, output_pdf): | |
# Open the source and destination PDF files | |
with open(src_pdf, 'rb') as src, open(dest_pdf, 'rb') as dest: | |
src_reader = PyPDF2.PdfFileReader(src) | |
dest_reader = PyPDF2.PdfFileReader(dest) | |
pdf_writer = PyPDF2.PdfFileWriter() | |
# Check the number of pages match in both PDFs |
This file contains hidden or 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
const axios = require("axios") | |
axios("https://sampo.thl.fi/pivot/prod/fi/epirapo/covid19case/fact_epirapo_covid19case.csv?row=508804L&column=measure-444833&fo=1") | |
.then(({data}) => { | |
// Pilko rivien mukaan arrayhin | |
data = data.split("\n") | |
// Poista ensimmäinen rivi, siinä ei ole dataa | |
data.shift() |
This file contains hidden or 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
document.getElementById('edit-captcha-questions-answer-given').value = document.getElementsByName('captcha_questions_question')[0].value.split(' ').map(a => ['nolla', 'yksi', 'kaksi', 'kolme', 'neljä', 'viisi', 'kuusi', 'seitsemän', 'kahdeksan', 'yhdeksän'].indexOf(a)).join(''); |