Change Pip Conf in Global

Change pip conf in global 1cat >> .pip/pip.conf << EOF 23[global] 45timeout = 6000 67index-url = https://pypi.douban.com/simple/ 89[install] 1011use-mirrors = true 1213mirrors = https://pypi.douban.com/simple/ 1415trusted-host = pypi.douban.com 1617EOF

CPython

CPython FFmpeg calls python Depends ffmpeg needs to dynamically compile (or python programs need to be statically compiled, it’s difficult) python program needs to call cpython interface Example docker images python programs debug

Zip Picture With Python

Zip Picture With Python 1from PIL import Image 2import sys 3def gipit(pname): 4 with Image.open(pname) as im: 5 im.save(pname+'.jpeg', 'jpeg', progressive=True, optimize=True) 6if __name__ == '__main__': 7 _, pname = sys.argv 8 gipit(pname)

Flask Logger

Flask Logger Flask logging 使用 Flask 时,如何优雅的输出日志。这些日志也许需要特定的格式,更丰富的信息,或者添加一些上下文的信息(如当前登录的用户名)等等。 根据官方文档

VIP Video Parse Link

VIP Video Parse Link 仅供学习交流,严禁用于商业用途,请于24小时内删除 从排名及考前的几个解析网站爬出来的解析链接,链接背后的技术以后研究了再跟进 “https://www.administratorw.com/admin.php?url=" “https://yun.odflv.com/?url=" “http://goudidiao.com/?url=" “https://jx.maoyun.tv/index.php?id=" “http://www.1717yun.com/jx/vip/index.php?url=" …

Python Exec Object

Python Exec Object exec() Syntax: 1exec(object[, globals[, locals]]) 2 3:param object: As already said this can be a string or object code 4:param globals: This can be a dictionary and the parameter is optional 5:param locals: This can be a mapping object and is also optional eg. 1from math import * 2exec("print(factorial(5))", …

Python Encode

Python Encode Python Encoding b'' 型 1b'hello'.decode() u'' 型 1a=u'\xe5\x9c\xa3\xe5\xbd\xbc\xe5\xbe\x97\xe5\xa0\xa1\xe6\x8e\x92\xe5\x90\x8d\xe7\xac\xac1 \xe9\xa4\x90\xe5\x8e\x85(\xe5\x85\xb18,650 \xe9\x97\xb4)' 2print(a.encode('raw-unicode-escape')) \u00 型 1>>> a = …