For example, if we want to grep a(unicode code point is u+0041), we can use the following
trick:
grep "$(printf '\u0041')" my_file.txt
| import numpy as np | |
| import numba | |
| class MaxPooling(object): | |
| def __init__(self, X, kernel_size=(2,2), stride=(2,2)): | |
| if len(X.shape) != 4: | |
| raise ValueError("Input must have be a tensor of shape N*C*H*W!") |
| import cv2 | |
| import numpy as np | |
| def main(): | |
| img = cv2.imread("test_image.jpg") | |
| # assume coord is a list with 8 float values, the points of the rectangle area should | |
| # have be clockwise | |
| x1, y1, x2, y2, x3, y3, x4, y4 = coord |
| { | |
| "shell_cmd": "g++ -std=c++11 -Wall \"${file}\" -o \"${file_path}/${file_base_name}\" && \"${file_path}/${file_base_name}\"", | |
| "file_regex": "^(..[^:]*):([0-9]+):?([0-9]+)?:? (.*)$", | |
| "working_dir": "${file_path}", | |
| "selector": "source.c++, source.cpp, source.cc, source.cxx", | |
| "variants": | |
| [ | |
| { | |
| "name": "Run in Terminal", |
| echo "Installing dependency packages..." | |
| # install packages which can be found by yum | |
| yum -y install libcurl-devel libX11-devel libXt-devel libXinerama-devel libpng-devel | |
| # download and install packages which are not in yum repo | |
| wget ftp://ftp.pbone.net/mirror/ftp5.gwdg.de/pub/opensuse/repositories/home:/Kenzy:/modified:/C7/CentOS_7/x86_64/imlib2-1.4.6-2.1.x86_64.rpm | |
| wget ftp://ftp.pbone.net/mirror/ftp5.gwdg.de/pub/opensuse/repositories/home:/Kenzy:/modified:/C7/CentOS_7/x86_64/imlib2-devel-1.4.6-2.1.x86_64.rpm | |
| wget https://jaist.dl.sourceforge.net/project/libjpeg-turbo/1.5.1/libjpeg-turbo-official-1.5.1.x86_64.rpm | |
| yum --nogpgcheck localinstall imlib2-1.4.6-2.1.x86_64.rpm imlib2-devel-1.4.6-2.1.x86_64.rpm libjpeg-turbo-official-1.5.1.x86_64.rpm |
| " Remove trailing white space, see https://vi.stackexchange.com/a/456/15292 | |
| function utils#StripTrailingWhitespaces() abort | |
| let l:save = winsaveview() | |
| " vint: next-line -ProhibitCommandRelyOnUser -ProhibitCommandWithUnintendedSideEffect | |
| keeppatterns %s/\v\s+$//e | |
| call winrestview(l:save) | |
| endfunction | |
| " Create command alias safely, see https://bit.ly/2ImFOpL. | |
| " The following two functions are taken from answer below on SO: |
| echo "Downloading gcc source files..." | |
| curl https://ftp.gnu.org/gnu/gcc/gcc-5.4.0/gcc-5.4.0.tar.bz2 -O | |
| echo "extracting files..." | |
| tar xvfj gcc-5.4.0.tar.bz2 | |
| echo "Installing dependencies..." | |
| yum -y install gmp-devel mpfr-devel libmpc-devel | |
| echo "Configure and install..." |
| """ | |
| in this script, we calculate the image per channel mean and standard | |
| deviation in the training set, do not calculate the statistics on the | |
| whole dataset, as per here http://cs231n.github.io/neural-networks-2/#datapre | |
| """ | |
| import numpy as np | |
| from os import listdir | |
| from os.path import join, isdir | |
| from glob import glob |