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 os | |
import shutil | |
def alter(old_file, new_file, old_new_map_arr): | |
with open(old_file, "r", encoding="utf-8") as f1, open(new_file, "w+", encoding="utf-8") as f2: | |
for line in f1: | |
for old_new_map in old_new_map_arr: | |
line = re.sub(old_new_map['old'], old_new_map['new'], line) |
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
“鸡你太美”原来是航空术语... ▶️:0.3m 💬:1.3k | |
“你连线都飞不直?”新年第... ▶️:0.2m 💬:0.7k | |
#UP主荣誉年报#粉丝200万,... ▶️:80k 💬:0.5k | |
在哪一帧,是你们梦开始的地... ▶️:0.5m 💬:2.2k | |
【请全村吃饭】漠叔结婚当主... ▶️:0.8m 💬:2.7k |
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
Vue.js 🕓 11h51m ████████████████▏░░░░░░░░░░ 60.1% | |
JavaScript 🕓 2h58m ████░░░░░░░░░░░░░░░░░░░░░░░ 15.1% | |
Markdown 🕓 2h20m ███▏░░░░░░░░░░░░░░░░░░░░░░░ 11.9% | |
TypeScript 🕓 1h27m █▉░░░░░░░░░░░░░░░░░░░░░░░░░ 7.4% | |
JSON 🕓 14m ▎░░░░░░░░░░░░░░░░░░░░░░░░░░ 1.2% |
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 getRandomColor(){ | |
var rgb = ['0', '0', '0']; | |
var r = Math.round(Math.random() * 255); | |
var g = Math.round(Math.random() * 255); | |
var b = Math.round(Math.random() * 255); | |
rgb[0] = r; | |
rgb[1] = g; | |
rgb[2] = b; | |
var c = 'rgb('+rgb[0]+','+rgb[1]+','+rgb[2]+')'; | |
var o = Math.round(((parseInt(rgb[0]) * 299) + (parseInt(rgb[1]) * 587) + (parseInt(rgb[2]) * 114)) /1000); |