This CSL file is made according to Peking University's style guide for politics term paper.
Released under CC BY-SA 3.0.
import inspect | |
from abc import abstractmethod as abstractmethod | |
import beartype._decor._decornontype | |
import equinox as eqx | |
import jax as jax | |
from beartype import BeartypeConf, beartype as typechecker | |
from beartype.door import die_if_unbearable, is_bearable | |
from beartype.typing import * # pyright: ignore[reportWildcardImportFromLibrary] | |
from equinox import Module as EqxModule |
import os | |
import time | |
import pathlib | |
from tqdm import tqdm | |
def is_file_old(file_path, month_in_seconds = 30*24*60*60): | |
"""Returns if the file is not a directory and is at least one month old.""" | |
if os.path.isdir(file_path): | |
return False | |
file_time = os.path.getmtime(file_path) |
/* esm.sh - esbuild bundle(ffjavascript@0.2.57) deno production */ | |
import __Process$ from "https://deno.land/std@0.177.0/node/process.ts";import { Buffer as __Buffer$ } from "https://deno.land/std@0.177.0/node/buffer.ts";var Ae=Object.defineProperty;var Fe=(i,t)=>{for(var e in t)Ae(i,e,{get:t[e],enumerable:!0})};var U={};Fe(U,{abs:()=>Ie,add:()=>yt,band:()=>Ct,bitLength:()=>V,bits:()=>Yt,bor:()=>Ue,bxor:()=>ke,div:()=>it,e:()=>M,eq:()=>P,exp:()=>Me,fromArray:()=>_e,fromRprBE:()=>ne,fromRprLE:()=>Y,fromString:()=>Mt,geq:()=>se,gt:()=>ft,isNegative:()=>Wt,isOdd:()=>bt,isZero:()=>It,land:()=>Ze,leq:()=>Ge,lnot:()=>Pe,lor:()=>Ne,lt:()=>ze,mod:()=>T,mul:()=>ee,naf:()=>Vt,neg:()=>te,neq:()=>Ce,one:()=>tt,pow:()=>ht,shiftLeft:()=>wt,shiftRight:()=>st,shl:()=>ve,shr:()=>Oe,square:()=>Re,sub:()=>X,toArray:()=>qe,toLEBuff:()=>H,toNumber:()=>we,toRprBE:()=>ie,toRprLE:()=>nt,toString:()=>lt,zero:()=>re});var Se=[0,1,2,2,3,3,3,3,4,4,4,4,4,4,4,4];function Mt(i,t){if(!t||t==10)return BigInt(i);if(t==16)return i.slice(0,2)= |
from PIL import Image | |
from PyPDF2 import PdfWriter, PdfReader | |
import tempfile | |
PREPEND_FILE = "打分框.pdf" | |
def scale_pdf_to_a4(input): | |
reader = input | |
if not isinstance(input, PdfReader): |
I hereby claim:
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
Remark: All the time is UTC+8. | |
Etaoin Wu, [13.03.18 08:24] | |
subtask 1: a path, so the answer is the sum of all edge weights | |
Etaoin Wu, [13.03.18 08:25] | |
subtask 2: one same tree repeating 3 times, equal to 3 * the distance, calculating the distance is O(n) | |
Etaoin Wu, [13.03.18 08:26] | |
subtack 3: a tree and a path, dis(a,b)=dep(a)+dep(b)-2 dep(LCA(a,b))+abs(L(a)-L(b)) |