All use http.proxy
and https.proxy
git config --global http.sslVerify false
pip install --trusted-host xxx.com package
cmake -D BOOST_INCLUDEDIR=/usr/local/include -D BOOST_LIBRARYDIR=/usr/local/lib -D PYTHON_EXECUTABLE=/root/anaconda/bin/python -D PYTHON_INCLUDE_DIR=/root/anaconda/include/python2.7 -D PYTHON_LIBRARY=/root/anaconda/lib/libpython2.7.so -D PYTHON_PACKAGES_PATH=/root/anaconda/lib/python2.7/site-packages/ -D PYTHON_NUMPY_INCLUDE_DIR=/root/anaconda/lib/python2.7/dist-packages/numpy/core/include -D CMAKE_BUILD_TYPE=RELEASE -D CMAKE_INSTALL_PREFIX=/usr/local -D WITH_TBB=ON -D WITH_EIGEN=ON BUILD_TESTS=OFF -D BUILD_PERF_TESTS=OFF -D BUILD_EXAMPLES=OFF -D WITH_OPENCL=OFF -D WITH_CUDA=OFF -D BUILD_opencv_gpu=OFF -D BUILD_opencv_gpuarithm=OFF -D BUILD_opencv_gpubgsegm=OFF -D BUILD_opencv_gpucodec=OFF -D BUILD_opencv_gpufeatures2d=OFF -D BUILD_opencv_gpufilters=OFF -D BUILD_opencv_gpuimgproc=OFF -D BUILD_opencv_gpulegacy=OFF -D BUILD_opencv_gpuoptflow=OFF -D BUILD_opencv_gpustereo=OFF -D BUILD_opencv_gpuwarping=OFF .. | |
cmake -D BOOST_INCLUDEDIR=/usr/local/include -D BOOST_LIBRARYDIR=/usr/local/lib -D PYTHON_EXECUTABLE=/r |
#!/usr/bin/env python | |
# net architecture of http://ccvl.stat.ucla.edu/ccvl/DeepLab/train.prototxt | |
# format: [kernel, stride] | |
deep_lab_vgg = [ | |
# 1 | |
[3, 1], | |
[3, 1], | |
[2, 2], | |
# 2 | |
[3, 1], |
""" | |
This is a batched LSTM forward and backward pass | |
""" | |
import numpy as np | |
import code | |
class LSTM: | |
@staticmethod | |
def init(input_size, hidden_size, fancy_forget_bias_init = 3): |
//used for training | |
def bi_lstm_unroll(seq_len, input_size,num_hidden, num_embed, num_label, dropout=0.): | |
embed_weight = mx.sym.Variable("embed_weight") | |
cls_weight = mx.sym.Variable("cls_weight") | |
cls_bias = mx.sym.Variable("cls_bias") | |
last_states = [] | |
last_states.append(LSTMState(c = mx.sym.Variable("l0_init_c"), h = mx.sym.Variable("l0_init_h"))) | |
last_states.append(LSTMState(c = mx.sym.Variable("l1_init_c"), h = mx.sym.Variable("l1_init_h"))) | |
forward_param = LSTMParam(i2h_weight=mx.sym.Variable("l0_i2h_weight"), |
# pylint: disable=C0111,too-many-arguments,too-many-instance-attributes,too-many-locals,redefined-outer-name,fixme | |
# pylint: disable=superfluous-parens, no-member, invalid-name | |
import sys | |
sys.path.insert(0, "../../python") | |
import mxnet as mx | |
import numpy as np | |
import cv2, random | |
from io import BytesIO | |
from captcha.image import ImageCaptcha |
nnoremap <F7> :make! test<CR> | |
augroup MakeRunTestGroup | |
autocmd! | |
autocmd QuickFixCmdPost make call RunTest() | |
augroup END | |
function! RunTest() | |
" check quickfix list | |
let l:b_ok = 1 | |
for m in getqflist() |
#!/bin/env python | |
import requests | |
from bs4 import BeautifulSoup as Soup | |
import cPickle | |
def getStarers(soup): | |
stars = soup.select('#repos .follow-list-item') | |
starers = [] | |
for s in stars: | |
starers.append(s.a['href']+'\n') |
cmake -D CMAKE_BUILD_TYPE=RELEASE -D CMAKE_INSTALL_PREFIX=/usr/local -D WITH_TBB=ON -D BUILD_NEW_PYTHON_SUPPORT=ON -D WITH_V4L=ON -D INSTALL_C_EXAMPLES=ON -D INSTALL_PYTHON_EXAMPLES=ON -D BUILD_EXAMPLES=ON -D WITH_QT=ON -D WITH_OPENGL=ON -D CUDA_GENERATION=Auto.. |