All use http.proxy and https.proxy
git config --global http.sslVerify false
pip install --trusted-host xxx.com package
| """ | |
| 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): |
| #!/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], |
| //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.. |
| <blacklist> | |
| <path>config.h</path> | |
| <path>include.hpp</path> | |
| <path>Makefile</path> | |
| <path>rnnlib</path> | |
| <path>rnnlib/Makefile</path> | |
| <path>src/CodeNet.hpp</path> | |
| <path>src/DecodingLayer.hpp</path> | |
| <path>src/Makefile</path> | |
| <path>src/MemoryNet.hpp</path> |