摘要:
from gevent import monkey from gevent.pool import Pool # 猴子补丁,替换底层thread/socket实现非阻塞 monkey.patch_all() import gevent import requests def func(url): p 阅读全文
摘要:
http://hadoop.apache.org/docs/r1.0.4/cn/hdfs_shell.html FS Shell 调用文件系统(FS)Shell命令应使用 bin/hadoop fs 的形式。 所有的的FS shell命令使用URI路径作为参数。URI格式是scheme://auth 阅读全文
摘要:
public static void main(String[] args) { String input = "我在[[中]][[国]]"; // ?匹配一个字符,+匹配一个或多个 Matcher matcher = Pattern.compile("(?<=\\[\\[)(\\S?)(?=\\] 阅读全文
摘要:
需求背景 标记出一句话中所有关键词 inpu:我想买苹果手机,请问哪里可以买苹果手机 keyword:"苹果", "苹果手机", "哪里" result:我想买[[苹果手机]],请问[[哪里]]可以买[[苹果手机]] 10w条耗时:41ms 难点:需要考虑单词重叠问题(overlap),例如“苹果手 阅读全文
摘要:
一、事务的基本要素(ACID) 1、原子性(Atomicity):事务开始后所有操作,要么全部做完,要么全部不做,不可能停滞在中间环节。事务执行过程中出错,会回滚到事务开始前的状态,所有的操作就像没有发生一样。也就是说事务是一个不可分割的整体,就像化学中学过的原子,是物质构成的基本单位。 2、一致性 阅读全文
摘要:
docker运行elasticsearch docker pull elasticsearch:7.8.1 docker run -p 9200:9200 -p 9300:9300 -e "discovery.type=single-node" elasticsearch:7.8.1 pom <de 阅读全文
摘要:
问题描述: Suppressed: org.elasticsearch.client.ResponseException: method [PUT], host [http://localhost:9200], URI [/search/doc/4?timeout=1m], status line 阅读全文
摘要:
import random import pandas as pd if __name__ == "__main__": df = pd.read_excel('../data/train.xlsx', dtype=str) result = [] for item in df.itertuples 阅读全文
摘要:
 阅读全文
摘要:
redis速度快的原因: 内存操作; 主线程通过变量获取IO多线程状态,变量不加锁,类似二维数组,每个线程操作自己的数组; 减少线程切换操作(6.x后采用多线程),IO多线程完成后采用空转而不是休眠,减少线程切换操作; IO多路复用(可理解为MapReduce)。 IO多线程优化:如果write线程 阅读全文
摘要:
tfserving模型部署见:https://www.cnblogs.com/bincoding/p/13266685.html demo代码:https://github.com/haibincoder/tf_tools 对应restful入参: { "inputs": { "input": [[ 阅读全文
摘要:
问题背景:python通过grpc调用tfserving报错, 提示:AttributeError: module 'tensorflow_serving.apis.prediction_service_pb2' has no attribute 'beta_create_PredictionSer 阅读全文
摘要:
官网:https://tensorflow.google.cn/tfx/guide/serving 步骤1:保存pb模型 # 为模型每一个参数添加name # ner demo: https://github.com/buppt/ChineseNER self.input_x = tf.placeh 阅读全文
摘要:
 阅读全文
摘要:
: """ 计算混淆矩阵及f1得分 :param correct_label: 正确的分类标签 ['0','1','2','3'] :param predict_label: 预测的分类标签 :return: """ 阅读全文
摘要:
train loss 不断下降,test loss不断下降,说明网络仍在学习; train loss 不断下降,test loss趋于不变,说明网络过拟合; train loss 趋于不变,test loss不断下降,说明数据集100%有问题; train loss 趋于不变,test loss趋于 阅读全文
摘要:
近几年来,基于神经网络的深度学习方法在计算机视觉、语音识别等领域取得了巨大成功,另外在自然语言处理领域也取得了不少进展。在NLP的关键性基础任务—命名实体识别(Named Entity Recognition,NER)的研究中,深度学习也获得了不错的效果。最近,笔者阅读了一系列基于深度学习的NER研 阅读全文
摘要:
文章目录前言经典方法WMD词移距离BM25深度文本匹配DSSMMatchPyramidESIMBiMPMDIINDRCN模型对比论文阅读Reference 前言 对于检索式对话系统最基本的步骤就是召回(retrieval) 匹配(matching) 排序(reranking)。匹配的得分直接决定最后 阅读全文
摘要:
![](https://img202... 阅读全文