Skip to content

Instantly share code, notes, and snippets.

View minghigh's full-sized avatar

minghigh minghigh

  • China
View GitHub Profile

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端口修改成自己的本地代理端口

@minghigh
minghigh / db_search.py
Created January 5, 2020 08:28
Python for running full text search with pymongo
# -*- coding: utf-8 -*-
import pymongo
# mongodb config
MONGODB_SERVER = 'localhost'
MONGODB_PORT = 27017
MONGODB_DB = 'database'
MONGODB_COLLECTION = 'collection'
@minghigh
minghigh / compute_angle.py
Created January 11, 2020 13:11
Two line compute angle
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')
@minghigh
minghigh / multi-face.ipynb
Created June 22, 2020 03:37 — forked from yang-zhang/multi-face.ipynb
Multi-task Deep Learning Experiment using fastai Pytorch
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.