会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
LeoGIS
博客园
首页
新随笔
联系
订阅
管理
上一页
1
2
3
4
5
下一页
2021年4月13日
python读取pdf
摘要: 最近项目上有个需求,就是把一批用户申请表(pdf文件)的内容,写入数据库。由于文件数量较大,需要批量处理。 本来以为很简单的事情,结果却因为pdf文件内容格式问题导致部分内容读不到: 读出内容:First Name (*) 具体的,这种pdf文件是一种表格,需要用户自己填入表格中的一些内容,比如用户
阅读全文
posted @ 2021-04-13 10:33 LeoGIS
阅读(831)
评论(0)
推荐(0)
2021年4月3日
ES exists查询
摘要: 今天有个同事说怀疑某个索引的一个字段是否有定义,因为查询结果中一直没有该字段。 我们可以使用exists来查询那些在特定字段有值的文档。 比如: ec2-user@ip-172-31-31-122:~> curl -H "Content-Type: application/json" -XGET '
阅读全文
posted @ 2021-04-03 19:33 LeoGIS
阅读(2105)
评论(0)
推荐(0)
2021年3月17日
TypeError: strptime() takes no keyword arguments
摘要: 代码如下: date = datetime.datetime.strptime("2020-01-01", format="%Y-%m-%d").date() 运行报错: TypeError: strptime() takes no keyword arguments 查看strptime的声明:
阅读全文
posted @ 2021-03-17 09:26 LeoGIS
阅读(2257)
评论(0)
推荐(0)
2021年2月27日
pandas dataframe 过滤
摘要: see https://www.cnblogs.com/bonelee/p/9882287.html 过滤 使用 [] 过滤 []中是一个boolean 表达式,凡是计算为 True 的行就会被选取。 df[df.A>1]
阅读全文
posted @ 2021-02-27 22:14 LeoGIS
阅读(101)
评论(0)
推荐(0)
验证elasticsearch某索引字段的值的唯一性
摘要: 有个索引字段命名为id,现在领导怀疑该字段的唯一性,需要验证下这个问题。 该字段的定义为: "id": { "type": "text", "fields": { "keyword": { "type": "keyword", "ignore_above": 256 } } }, 对应的验证语句为:
阅读全文
posted @ 2021-02-27 20:02 LeoGIS
阅读(955)
评论(0)
推荐(0)
ubuntu下elasticsearch jvm配置文件/etc/elasticsearch/jvm.options无效的问题
摘要: 网上资料说配置文件为/etc/elasticsearch/jvm.options,但是发现无效,可以找下elasticsearch下的config/jvm.options
阅读全文
posted @ 2021-02-27 16:23 LeoGIS
阅读(1164)
评论(0)
推荐(0)
Ubuntu /etc/security/limits.conf 不生效问题
摘要: see https://blog.csdn.net/gfzdgd/article/details/104678975 key point: Ubuntu下图形登录后非图形登录的配置文件是不同的,/etc/security/limits.conf 只是在非图形登录情况下有效。 图形登录情况下需要修改:
阅读全文
posted @ 2021-02-27 15:54 LeoGIS
阅读(621)
评论(0)
推荐(0)
2021年2月20日
python脚本中的awk命令
摘要: see https://www.cnpython.com/qa/221588 key point: run('docker ps -a | grep {} | awk "{print $1}"'.format(container_name)) KeyError: 'print $1'solution
阅读全文
posted @ 2021-02-20 14:56 LeoGIS
阅读(934)
评论(0)
推荐(0)
Dockerfile 指定 pip 安装源
摘要: see https://www.cnblogs.com/kai-/p/13457800.html key point: RUN pip install -i https://pypi.tuna.tsinghua.edu.cn/simple --no-cache-dir -r requirements
阅读全文
posted @ 2021-02-20 14:51 LeoGIS
阅读(576)
评论(0)
推荐(0)
2021年2月12日
python在日志中记录异常堆栈
摘要: use logger.exception while not logger.error
阅读全文
posted @ 2021-02-12 21:19 LeoGIS
阅读(149)
评论(0)
推荐(0)
上一页
1
2
3
4
5
下一页
公告