Skip to content

Instantly share code, notes, and snippets.

View hieast's full-sized avatar
🎯
Focusing

Hieast hieast

🎯
Focusing
  • Shanghal, China
View GitHub Profile
@hieast
hieast / WotD_info_NOAD.plist
Last active August 21, 2019 05:35
changed_WotD_info_NOAD.plist
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>DCSWotDBoldFontName</key>
<string>.SFNSRounded-Semibold</string>
<key>DCSWotDDictionaryID</key>
<string>com.apple.dictionary.NOAD</string>
<key>DCSWotDEntries</key>
<array>
import re
origin = "abcdefghigkqpwueriwutghlskajdf,mnbz,xcnvoiequynf12341234321065498+7mnbz,xcnvoiequynf12341234321065498+7mnbz,xcnvoiequynf12341234321065498+7mnbz,xcnvoiequynf12341234321065498+7"
meta = "mn"
pattern = re.compile("mn")
assert origin.replace(meta, "") == pattern.sub("", origin)
%timeit(origin.replace(meta, ""))
%timeit(pattern.sub("", origin))