[TOC]
公告三 https://www.facebook.com/NTUVote/posts/pfbid02DWVexEuhge39YJBDUXDFk8jqBhTVAcbcsidTCup6RpHJTESvjrHnM2Fk3E24FWXl 台語:https://reurl.cc/E1q1Kv 客語:https://reurl.cc/dmdm0D 華語:https://reurl.cc/A0E018 英語:https://reurl.cc/E1q17v
from pathlib import Path | |
from pikepdf import * | |
a5_pdf_path = Path('A5_PDF_PATH') | |
a4_output_path = Path('A4_OUTPUT_PATH') | |
a4_pdf = Pdf.new() | |
a4_pdf.add_blank_page(page_size=(595, 842)) | |
destination_page = a4_pdf.pages[0] |
from functools import reduce | |
import numpy as np | |
s = np.random.randn(8).reshape(2,2,2) | |
u, e, v = np.linalg.svd(s.reshape(2, 4), full_matrices=False) | |
a1 = u | |
s2 = np.tensordot(np.diag(e), v, axes=(-1, 0)) |
import math | |
def actual_final(month, rate, save): | |
current = save | |
for _ in range(month): | |
current = round(current * (1 + rate / 100 / 12)) | |
return current | |
# This script is an workaround for the hotkey binding problem reported in 2020.09. | |
# See: https://community.intel.com/t5/Graphics/Keyboard-problem-with-quot-Intel-Graphics-Command-Center-quot/m-p/1212469 | |
from pywinauto.application import Application | |
from pywinauto.timings import always_wait_until_passes | |
main_app = Application(backend='uia').start('explorer.exe shell:appsFolder\AppUp.IntelGraphicsExperience_8j3eq9eme6ctt!App') | |
@always_wait_until_passes(30, 1) | |
def toggle_hotkey(): |
import os | |
import urllib.request | |
import threading | |
import sys | |
def filenames(type): | |
yield f'{type}-1080-init.m4s.mp4' | |
id = 1 | |
while True: |
name: Formulas for PowerPoint | |
description: Insert math equations into the online version of PowerPoint. | |
host: POWERPOINT | |
api_set: {} | |
script: | |
content: | | |
var editor; | |
const MathJax = window["MathJax"]; | |
const ace = window["ace"]; | |
const toastr = window["toastr"]; |
name: Issue about selecting SVG | |
description: Demo the issue about selecting SVG. | |
host: POWERPOINT | |
api_set: {} | |
script: | |
content: >+ | |
$("#run").click(() => tryCatch(run)); | |
const run: Function = async () => { |
name: Formulas for Word | |
description: Insert math equations into the online version of Word. | |
host: WORD | |
api_set: {} | |
script: | |
content: > | |
var editor; | |
const MathJax = window["MathJax"]; |
/** | |
* 1. Get current rates from https://www.xe.com/api/protected/midmarket-converter/ | |
* 2. Replace "rates" object with the correct currency rates. | |
* 3. Select a book on Kobo. | |
* 4. Click the country flag at the top right corner. | |
* 5. Execute this script. | |
*/ | |
rates = { | |
ADA: 3.8456167243, |