分类 默认分类 下的文章

const items = [
  'https://httpbin.org/bytes/2',
  'https://httpbin.org/bytes/2',
  'https://httpbin.org/bytes/2',
  'https://httpbin.org/bytes/2',
  'https://httpbin.org/bytes/2',
  'https://httpbin.org/bytes/2',
  'https://httpbin.org/bytes/2',
  'https://httpbin.org/bytes/2'
]

// get a cursor that keeps track of what items have already been processed.
let cursor = items.entries();

// create 5 for loops that each run off the same cursor which keeps track of location
Array(5).fill().forEach(async (item,idx) => {
    for (let [index, url] of cursor){
        console.log('getting url is ', index, url,idx)
        // run your async task instead of this next line
        var text = await fetch(url).then(res => res.text())
        console.log('text is', text.slice(0, 20))
    }
})
console.log("asdf")

hamming距离
要求单词长度必须相等

Jaro–Winkler
对前缀的权重较大,如果单词前若干字母有相同,不管顺序如何,其得分都比单词后端匹配相同的得分更高

Levenshtein
实际上只代表编辑距离,不代表语义距离

词干提取
Porter
Snowball(Porter2)
Lancaster

情感分析分归器
Naive Bayes(朴素贝叶斯)
logistic regression(逻辑回归)

相关性算法
tf-idf
TF-IDF是一种统计方法,用以评估一个词语对于一份文档的重要程度。TF表示词频,对一份文档而言,词频是特定词语在这篇文档里出现的次数除以文档的词语总数。
IDF表示一个词的逆向文档频率指数,可以由总文档数目除以包含该词语的文档数目,再将得到的商取对数得到,它表达的是词语的权重指数。
计算出每个词的词频和权重指数后,两者相乘,即可得到这个词在文档中的重要程度。

词袋算法

https://blog.csdn.net/sinat_25394043/article/details/108404210
https://zhuanlan.zhihu.com/p/507830576
https://www.ruanyifeng.com/blog/2013/12/naive_bayes_classifier.html [朴素贝叶斯]
https://blog.csdn.net/weixin_44016035/article/details/114953363 [tf-idf&&贝叶斯分类实践]
https://zhuanlan.zhihu.com/p/567344139?utm_medium=social&utm_oi=28131683467264&utm_psn=1568991035304398848&utm_source=wechat_session [BERT]

curl -sL https://deb.nodesource.com/setup_16.x | bash -

npm config set registry https://mirrors.huaweicloud.com/repository/npm/
npm config set disturl https://mirrors.huaweicloud.com/nodejs/
npm config set electron_mirror https://mirrors.huaweicloud.com/electron/
deb http://mirrors.aliyun.com/ubuntu/ focal main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ focal-security main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ focal-updates main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ focal-backports main restricted universe multiverse

# deb-src http://mirrors.aliyun.com/ubuntu/ focal main restricted universe multiverse
# deb-src http://mirrors.aliyun.com/ubuntu/ focal-security main restricted universe multiverse
# deb-src http://mirrors.aliyun.com/ubuntu/ focal-updates main restricted universe multiverse
# deb-src http://mirrors.aliyun.com/ubuntu/ focal-backports main restricted universe multiverse

## Pre-released source, not recommended.
# deb http://mirrors.aliyun.com/ubuntu/ focal-proposed main restricted universe multiverse
# deb-src http://mirrors.aliyun.com/ubuntu/ focal-proposed main restricted universe multiverse
#添加阿里源
deb https://mirrors.ustc.edu.cn/ubuntu/ focal main restricted universe multiverse
# deb-src https://mirrors.ustc.edu.cn/ubuntu/ focal main restricted universe multiverse

deb https://mirrors.ustc.edu.cn/ubuntu/ focal-security main restricted universe multiverse
# deb-src https://mirrors.ustc.edu.cn/ubuntu/ focal-security main restricted universe multiverse

deb https://mirrors.ustc.edu.cn/ubuntu/ focal-updates main restricted universe multiverse
# deb-src https://mirrors.ustc.edu.cn/ubuntu/ focal-updates main restricted universe multiverse

deb https://mirrors.ustc.edu.cn/ubuntu/ focal-backports main restricted universe multiverse
# deb-src https://mirrors.ustc.edu.cn/ubuntu/ focal-backports main restricted universe multiverse

#添加清华源
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-updates main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-updates main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-backports main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-backports main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-security main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-security main restricted universe multiverse multiverse
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs > rust.sh
export RUSTUP_UPDATE_ROOT="https://mirrors.ustc.edu.cn/rust-static/rustup"
export RUSTUP_DIST_SERVER=https://mirrors.tuna.tsinghua.edu.cn/rustup

docker run -dit -p 8881:8080 \
  --restart=always \
  --name codeserver \
  -h vscode \
  -u root \
  -v /tmp/coder-data:/home/simon \
  -v /tmp/coder-config:/root/simon \
  -v /etc/localtime:/etc/localtime:ro \
  -e PASSWORD=n418 \
  codercom/code-server:3.4.1 

docker run -d -p 8886:8888 -p 22:21 -p 443:443 -p 80:80 -p 889:888 -v ~/website_data:/www/wwwroot -v ~/mysql_data:/www/server/data -v ~/vhost:/www/server/panel/vhost aapanel/aapanel:lib