图片处理
- pip install httpstat
- httpstat httpbin.org/get
- pip install pillow
- from PIL import Image
- import numpy as np
- a = np.array(Image.open('test.jpg'))
- b = [255,255,255] - a
- im = Image.fromarray(b.astype('uint8'))
- im.save('new.jpg')
youtube-dl下载国外视频
- pip install youtube-dl #直接安装youtube-dl
- pip install -U youtube-dl #安装youtube-dl并更新
- youtube-dl "http://www.youtube.com/watch?v=-wNyEUrxzFU"
查看对象的全部属性和办法
- pip install pdir2
- >>> import pdir,requests
- >>> pdir(requests)
- module attribute:
- __cached__, __file__, __loader__, __name__, __package__, __path__, __spec__
- other:
- __author__, __build__, __builtins__, __copyright__, __license__, __title__,
- __version__, _internal_utils, adapters, api, auth, certs, codes, compat, cookies
- , exceptions, hooks, logging, models, packages, pyopenssl, sessions, status_code
- s, structures, utils, warnings
- special attribute:
- __doc__
- class:
- NullHandler: This handler does nothing. It's intended to be used to avoid th
- e
- PreparedRequest: The fully mutable :class:`PreparedRequest <PreparedRequest>
- ` object,
- Request: A user-created :class:`Request <Request>` object.
- Response: The :class:`Response <Response>` object, which contains a
- Session: A Requests session.
- exception:
- ConnectTimeout: The request timed
推荐阅读
Windows 10 16257完美启用控制台新版配色的操作方法
很多人在启用Windows10 16257控制台的新版配色时,发清楚明了一个小问题,那就是“大年夜Win+X菜单启动的Powershell和CMD标题栏上右击,选择“属性”,弹出窗口的色彩选项>>>详细阅读
本文标题:那些有趣/用的Python库
地址:http://www.17bianji.com/lsqh/36609.html
1/2 1