from sys import setrecursionlimit
setrecursionlimit(10**8)
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
import re | |
import sys | |
from colorsys import hls_to_rgb, rgb_to_hls | |
from itertools import chain | |
def hex2rgb(x): | |
x = x.lstrip("#") | |
if len(x) == 3: | |
x = "".join(chain(*zip(x, x))) |
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
import cv2 | |
import matplotlib.pyplot as plt | |
import numpy as np | |
import numpy.typing as npt | |
from imutils import opencv2matplotlib | |
from opencv_utils import cvt_single_color | |
def show(image: npt.NDArray, contours=None): |
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
import re | |
import sys | |
from pathlib import Path | |
from pprint import pprint | |
from subprocess import check_output | |
from sys import argv | |
from tqdm import tqdm | |
对呀对呀!……排序有十二样写法,你知道么?
这种算法能如此知名,可能是历史遗留问题
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
#pragma region base | |
#include "bits/stdc++.h" | |
using namespace std; | |
using i64 = int64_t; | |
using u64 = uint64_t; | |
using i32 = int32_t; | |
using u32 = uint32_t; |
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
final _cjkQuote = RegExp( | |
'([\u2e80-\u2eff\u2f00-\u2fdf\u3040-\u309f\u30a0-\u30ff\u3100-\u312f\u3200-\u32ff\u3400-\u4dbf\u4e00-\u9fff\uf900-\ufaff])(["])'); | |
final _quoteCJK = RegExp( | |
'(["])([\u2e80-\u2eff\u2f00-\u2fdf\u3040-\u309f\u30a0-\u30ff\u3100-\u312f\u3200-\u32ff\u3400-\u4dbf\u4e00-\u9fff\uf900-\ufaff])'); | |
final _fixQuote = RegExp("([\"']+)(s*)(.+?)(s*)([\"']+)"); | |
final _fixSingleQuote = RegExp( | |
"([\u2e80-\u2eff\u2f00-\u2fdf\u3040-\u309f\u30a0-\u30ff\u3100-\u312f\u3200-\u32ff\u3400-\u4dbf\u4e00-\u9fff\uf900-\ufaff])( )(')([A-Za-z])"); | |
final _hashANSCJKhash = RegExp( | |
'([\u2e80-\u2eff\u2f00-\u2fdf\u3040-\u309f\u30a0-\u30ff\u3100-\u312f\u3200-\u32ff\u3400-\u4dbf\u4e00-\u9fff\uf900-\ufaff])(#)([A-Za-z0-9\u2e80-\u2eff\u2f00-\u2fdf\u3040-\u309f\u30a0-\u30ff\u3100-\u312f\u3200-\u32ff\u3400-\u4dbf\u4e00-\u9fff\uf900-\ufaff]+)(#)([\u2e80-\u2eff\u2f00-\u2fdf\u3040-\u309f\u30a0-\u30ff\u3100-\u312f\u3200-\u32ff\u3400-\u4dbf\u4e00-\u9fff\uf900-\ufaff])'); | |
final _cjkHash = RegExp( |
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
var delimiter = "<br>" | |
var weekCycle = []; | |
weekCycle[1] = "";// "%u8FDE"; | |
weekCycle[2] = "%u5355"; | |
weekCycle[3] = "%u53CC"; | |
var result = new String(""); | |
var weeksPerYear = 53; | |
// 输出教学活动信息 | |
function activityInfo() { | |
return "teacherId:" + this.teacherId + "\n" |
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
function fixnat { | |
net stop winnat | |
net start winnat | |
} | |
function proxy { | |
$Env:http_proxy="http://127.0.0.1:7890";$Env:https_proxy="http://127.0.0.1:7890" | |
} |
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
import keyboard | |
import pydirectinput as pyautogui | |
pyautogui.PAUSE = 0 | |
def f(): | |
while not keyboard.is_pressed("0"): | |
pyautogui.press("up") |
OlderNewer