dawn-liu

  博客园  :: 首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理

2019年11月19日

摘要: #通过zookpeer找到对应的hive from kazoo.client import KazooClient zkClient = KazooClient(hosts="ip1:2181,ip2:2181") zkClient.start() result = zkClient.get_chi 阅读全文
posted @ 2019-11-19 18:14 dawn-liu 阅读(861) 评论(0) 推荐(0) 编辑

摘要: 一 jinja2 用来给python提供html语法的模块 安装 pip install jinja2 使用 from jinja2 import Template def html_output(para): # 输出格式化 template = Template( '<table border= 阅读全文
posted @ 2019-11-19 14:48 dawn-liu 阅读(314) 评论(0) 推荐(0) 编辑

摘要: import chardet a=b'\xe4\xbd\xa0\xe5\xa5\xbd\xef\xbc\x8c\xe4\xb8\x96\xe7\x95\x8c\xe3\x80\x82'print(chardet.detect(a)) # {'encoding': 'utf-8', 'confiden 阅读全文
posted @ 2019-11-19 14:31 dawn-liu 阅读(414) 评论(0) 推荐(0) 编辑