注意:impyla 既可以连接impala, 也可以连接hive 环境 : windows10 python版本:3.6 hive版本:1.1 亲测可用! impyla安装过程 安装依赖 pip install bit_array pip install thrift pip install thr ...
分类:
编程语言 时间:
2020-05-27 18:25:56
阅读次数:
148
1、super 是干嘛用的?在 Python2 和 Python3 使用,有什么区别?为什么要使用 super?请举例说明。答:super 用于继承父类的方法、属性。super 是新式类中才有的,所以 Python2 中使用时,要在类名的参数中写 Object。Python3 默认是新式类,不用写, ...
分类:
移动开发 时间:
2020-05-27 15:09:40
阅读次数:
114
Anaconda prompt中命令:anconda prompt可以直接管理整个conda下的资源1.下载conda中没有的python资源包比如没有python3.6可以执行下面的命令: conda create -n py36 python=3.6 2.激活环境,如果这个环境不存在conda会 ...
分类:
其他好文 时间:
2020-05-27 13:43:54
阅读次数:
71
frida是多平台hook框架,类似安卓的xposed框架,详情百度。 1、安装python ,我是python3.8 并建好环境变量 2、添加pip的环境变量 3.8自带pip,在 python安装目录下的 scripts文件夹 3、用 pip 安装frida 和 frida-tools 4、下载 ...
分类:
其他好文 时间:
2020-05-27 12:06:12
阅读次数:
116
使用 virtualenv/venv 和 pip 管理虚拟环境: 进入项目的根目录,创建虚拟环境:virtualenv --python=python3 venv或python3 -m venv ./venv(venv不用安装,不过需要python3.3以上) 进入虚拟环境:source venv/ ...
分类:
其他好文 时间:
2020-05-27 01:28:22
阅读次数:
81
import os def func(): # 在python中使用linux命令,参数是(字符串),返回值为(0或1),返回值为0则命令执行成功 a = os.system('mkdir test') # 判断test.py文件是否存在,参数是(文件名或者绝对路径文件名),返回值为布尔值True或 ...
分类:
编程语言 时间:
2020-05-26 23:33:35
阅读次数:
150
filter函数用来过滤数据。 1.基本示例: def is_odd(n): return n % 2 == 1 newlist = filter(is_odd, [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]) print(f'odd:{newlist}') print(f'odd ...
分类:
编程语言 时间:
2020-05-26 23:30:38
阅读次数:
105
一、背景说明 说实话自己是做安全的,平时总是给别人代码找茬,但轮到自己写代码有时比开发还不注重安全,其中有安全脚本一般比较小考虑安全那么处理安全问题的代码比重将会大大超过业务代码的问题也有不是专职开发添加一项功能还没开发那么熟练的问题。由于安全脚本一般不是对外开启服务的,所以一般也不会暴出什么问题。 ...
分类:
编程语言 时间:
2020-05-26 20:44:45
阅读次数:
111
Python3中的规定是把所有tab都换成空格,一个文件中不允许空格和tab并存,只能存在其中一个 ...
分类:
其他好文 时间:
2020-05-26 00:53:32
阅读次数:
80
1.AttributeError: module 'urllib.response' has no attribute 'read' 代码: res=urllib.response.read().decode('UTF-8')#读取网页内容,用utf-8解码成字节 1) python3中应该 imp ...
分类:
其他好文 时间:
2020-05-25 19:32:09
阅读次数:
61