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
#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
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
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
import keyboard | |
import pydirectinput as pyautogui | |
pyautogui.PAUSE = 0 | |
def f(): | |
while not keyboard.is_pressed("0"): | |
pyautogui.press("up") |
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 | |
from itertools import product | |
from random import sample | |
import pytest | |
from automata.fa.dfa import DFA | |
dfa = DFA( | |
states=set("pqrs"), | |
input_symbols=set("01"), |
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
from itertools import product | |
import pytest | |
from automata.tm.configuration import TMConfiguration | |
from automata.tm.dtm import DTM | |
from automata.tm.tape import TMTape | |
tm = DTM( | |
states={f"q{i}" for i in range(7)}, | |
input_symbols=set("01"), |
OlderNewer