- OS - High Sierra 10.13
- Tensorflow - 1.4
- Xcode command line tools - 8.2 (Download from here: Xcode - Support - Apple Developer & Switch to different clang version: sudo xcode-select --switch/Library/Developer/CommandLineTools & check version: clang -v)
- Cmake - 3.7
- Bazel - 0.7.0
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# coding: utf-8 | |
import cv2 | |
import h5py | |
import numpy | |
img = cv2.imread('/Users/chexov/opencv-lena.jpg', 1) | |
f = h5py.File('test2.hdf5', mode='w') | |
group = f.create_group("images") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export OPENCV_OPENCL_RUNTIME="" | |
find positives/ -type f | \ | |
xargs -P 8 -n 1 -INAME opencv_createsamples -bgcolor 0 -bgthresh 0 -maxxangle 1.1 -maxyangle 1.1 -maxzangle 0.5 -maxidev 40 -w 80 -h 40 -img 'NAME' -bg ./negs/negatives.txt -vec samples/NAME.vec -num 1 | |
wget 'https://raw.githubusercontent.com/wulfebw/mergevec/master/mergevec.py' | |
python mergevec.py -v ./samples/cuts/ -o samples.vec | |
OPENCV_OPENCL_RUNTIME=NVIDIA:GPU:1 opencv_traincascade -data classifier -vec samples.vec -bg negs/negatives.txt -numStages 20 -minHitRate 0.999 -maxFalseAlarmRate 0.5 -numPos 70000 -numNeg 78678 -w 80 -h 40 -mode ALL -precalcValBufSize 1024 -precalcIdxBufSize 1024 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
NVIDIA_GPGKEY_SUM=d1be581509378368edeec8c1eb2958702feedf3bc3d17011adbf24efacce4ab5 && \ | |
NVIDIA_GPGKEY_FPR=ae09fe4bbd223a84b2ccfce3f60f4b3d7fa2af80 && \ | |
apt-key adv --fetch-keys http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1604/x86_64/7fa2af80.pub && \ | |
apt-key adv --export --no-emit-version -a $NVIDIA_GPGKEY_FPR | tail -n +5 > cudasign.pub && \ | |
echo "$NVIDIA_GPGKEY_SUM cudasign.pub" | sha256sum -c --strict - && rm cudasign.pub | |
echo "deb http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1604/x86_64 /" > /etc/apt/sources.list.d/cuda.list | |
echo "deb http://developer.download.nvidia.com/compute/machine-learning/repos/ubuntu1604/x86_64/ /" > /etc/apt/sources.list.d/nvidia-machine-learning.list |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
``` | |
Just put it into your code and import like this | |
import android.org.apache.commons.codec.binary.Hex; | |
``` | |
package android.org.apache.commons.codec.binary; | |
import java.nio.charset.Charset; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var zeroPad2 = function (n) { | |
var _n = n + ""; | |
if (_n.length < 2) { | |
return "0" + _n; | |
} else { | |
return _n; | |
} | |
}; | |
var zeroPad = function (n, width) { | |
var z = "0"; |
During the dry run and again during the release proper you will be prompted for version information. The release plugin will attempt to guess the release, tag and snapshot versions. You can accept the values as is or supply your own.
mvn release:prepare -DdryRun=true
Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.
$ python -m SimpleHTTPServer 8000
lxc profile create gpu
lxc profile device add gpu /dev/nvidia0 unix-char path=/dev/nvidia0
lxc profile device add gpu /dev/nvidia1 unix-char path=/dev/nvidia1
lxc profile device add gpu /dev/nvidiactl unix-char path=/dev/nvidiactl
lxc profile device add gpu /dev/nvidia-uvm unix-char path=/dev/nvidia-uvm
lxc profile device add gpu /dev/nvidia-uvm-tools unix-char path=/dev/nvidia-uvm-tools
lxc profile assign modelAgency default,gpu
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#cloud-config | |
apt_sources: | |
- source: "ppa:webupd8team/java" | |
package_upgrade: true | |
package_update: true | |
packages: | |
- mysql-server | |
- apache2-utils |