Skip to content

Instantly share code, notes, and snippets.

View WincerChan's full-sized avatar
🎯
Focusing

LoeRfy WincerChan

🎯
Focusing
View GitHub Profile
@WincerChan
WincerChan / main.rs
Created February 18, 2021 09:11
test for cangjie tokenstream
use tantivy::{SnippetGenerator, collector::TopDocs};
use tantivy::query::QueryParser;
use tantivy::schema::*;
use tantivy::{doc, Index, ReloadPolicy};
use cang_jie::{CangJieTokenizer, TokenizerOption, CANG_JIE};
use jieba_rs::Jieba;
use std::sync::Arc;
fn tokenizer() -> CangJieTokenizer {
@WincerChan
WincerChan / trie.go
Last active June 7, 2020 05:17
某些时候,字典树比哈希表更快吗?| Sometimes, is trie faster than hashmap?
package main
const R = 26
type TrieNode struct {
value int
next []TrieNode
}
type TrieST struct {
Python 18 hrs 33 mins ████████████████▎░░░░ 77.5%
HTML 1 hr 40 mins █▍░░░░░░░░░░░░░░░░░░░ 7.0%
Other 1 hr 28 mins █▎░░░░░░░░░░░░░░░░░░░ 6.2%
JavaScript 52 mins ▊░░░░░░░░░░░░░░░░░░░░ 3.7%
Bash 33 mins ▍░░░░░░░░░░░░░░░░░░░░ 2.4%
@WincerChan
WincerChan / aria2.conf
Created June 15, 2019 08:11
Aria2 配置文件
## 全局设置 ## ============================================================
# 日志
#log-level=warn
#log=/PATH/.aria2/aria2.log
# 下载位置,改成你自己的 默认: 当前启动位置
dir=/media/wincer/Deep/Videos
disk-cache=32M
# 文件预分配方式, 能有效降低磁盘碎片, 默认:prealloc
from os import listdir
def main():
for file in listdir("./"):
if file.endswith('.md'):
single(file)
def single(file):
@WincerChan
WincerChan / config.yml
Created June 14, 2018 12:18
CircleCI 配置文件
# 设置默认 image
defaults: &defaults
docker:
- image: circleci/node:10.4.0
version: 2
jobs:
build:
# 导入默认设置
<<: *defaults
@WincerChan
WincerChan / loadCORS.js
Created May 27, 2018 07:57
将跨域资源转为本地资源
// 脚本资源
let tmpWorker = await fetch(workerUrl),
workerSrcBlob = new Blob([await tmpWorker.text()], { type: 'text/javascript' }),
workerBlobURL = window.URL.createObjectURL(workerSrcBlob);
// workerBlobURL 即为网站域名下的资源
// 图片资源
let tmpImg = await fetch(imageUrl),
@WincerChan
WincerChan / gist:50b1d6091da061c98f6d2c04e4ff49e0
Created January 4, 2018 04:41 — forked from rxaviers/gist:7360908
Complete list of github markdown emoji markup

People

:bowtie: :bowtie: 😄 :smile: 😆 :laughing:
😊 :blush: 😃 :smiley: ☺️ :relaxed:
😏 :smirk: 😍 :heart_eyes: 😘 :kissing_heart:
😚 :kissing_closed_eyes: 😳 :flushed: 😌 :relieved:
😆 :satisfied: 😁 :grin: 😉 :wink:
😜 :stuck_out_tongue_winking_eye: 😝 :stuck_out_tongue_closed_eyes: 😀 :grinning:
😗 :kissing: 😙 :kissing_smiling_eyes: 😛 :stuck_out_tongue:
@WincerChan
WincerChan / get_link.py
Last active October 22, 2021 05:53
获得QQ音乐直链
@WincerChan
WincerChan / ResLoader.js
Created November 26, 2017 01:45 — forked from willerce/ResLoader.js
保存 Javascript 和 CSS 到 LocalStorage 中
var Loader = (function () {
function Loader(options) {
this.options = options;
if (resource.scripts && resource.baseUrl) {
for (var i = 0; i < this.options.scripts.length; i++) {
this.load('js', this.options.scripts[i]);
}
for (var i = 0; i < this.options.stylesheets.length; i++) {
this.load('css', this.options.stylesheets[i]);
}