[TOC]
學生會學生代表選舉選舉公報 https://drive.google.com/drive/folders/1knJT_S4ZE4qmFRJCj9O2SMbxKA0uePnK?usp=sharing
學生會學生代表補選選舉公報
import numpy as np | |
from collections import defaultdict | |
import matplotlib.pyplot as plt | |
import matplotlib.animation as animation | |
def hadamard_walk( | |
state: dict[tuple[int, int], np.complex128] | |
) -> dict[tuple[int, int], np.complex128]: | |
new_state = defaultdict(lambda: np.complex128(0)) |
/** | |
* Crawler for Microsoft Teams Channel Posts | |
* | |
* This script uses Puppeteer to automate a browser session, crawl a specified Microsoft Teams channel, | |
* extract posts along with their attachments and images, convert post content from HTML to Markdown, and | |
* then save the results as JSON, YAML, and Markdown files. | |
* | |
* Steps to use this script: | |
* 1. Install Node.js and all required modules. | |
* 2. Run the script using the command: `node crawler.js`. |
#include <iostream> | |
#include <tuple> | |
#include <array> | |
#include <complex> | |
using TypeList = std::tuple<void, double, std::complex<float>, int, bool>; | |
template <typename T> |
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"]; |