socks5协议,1080端口修改成自己的本地代理端口
git config --global http.proxy socks5://127.0.0.1:1080
git config --global https.proxy socks5://127.0.0.1:1080
http协议,1080端口修改成自己的本地代理端口
socks5协议,1080端口修改成自己的本地代理端口
git config --global http.proxy socks5://127.0.0.1:1080
git config --global https.proxy socks5://127.0.0.1:1080
http协议,1080端口修改成自己的本地代理端口
| # -*- coding: utf-8 -*- | |
| import pymongo | |
| # mongodb config | |
| MONGODB_SERVER = 'localhost' | |
| MONGODB_PORT = 27017 | |
| MONGODB_DB = 'database' | |
| MONGODB_COLLECTION = 'collection' |
| def _check(x): | |
| return x == float('inf') or x == float('-inf') or x == float('nan') | |
| def _slop(pt1, pt2, pt3, pt4): | |
| det_x1 = pt1[0] - pt2[0] | |
| det_x2 = pt3[0] - pt4[0] | |
| det_y1 = pt1[1] - pt2[1] | |
| det_y2 = pt3[1] - pt4[1] | |
| k1 = det_y1 / det_x1 if det_x1 != 0 else float('inf') |