Value | Color |
---|---|
\e[0;30m | Black |
\e[0;31m | Red |
\e[0;32m | Green |
\e[0;33m | Yellow |
\e[0;34m | Blue |
\e[0;35m | Purple |
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
cmake -D CMAKE_BUILD_TYPE=RELEASE \ | |
-D CMAKE_INSTALL_PREFIX=/usr/local \ | |
-D BUILD_NEW_PYTHON_SUPPORT=ON \ | |
-D WITH_CUDA=ON \ | |
-D ENABLE_FAST_MATH=1 \ | |
-D WITH_FFMPEG=ON \ | |
-D CUDA_FAST_MATH=1 \ | |
-D WITH_CUBLAS=1 \ | |
-D BUILD_opencv_python3=yes \ | |
-D CMAKE_INSTALL_PREFIX=$(python3 -c "import sys; print(sys.prefix)") \ |
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
# Install R | |
sudo apt update | |
sudo apt install gdebi libxml2-dev libssl-dev libcurl4-openssl-dev libopenblas-dev r-base r-base-dev | |
# Install RStudio | |
cd ~/Downloads | |
wget https://download1.rstudio.org/desktop/bionic/amd64/rstudio-1.2.5001-amd64.deb | |
sudo gdebi rstudio-1.2.5001-amd64.deb | |
printf '\nexport QT_STYLE_OVERRIDE=gtk\n' | sudo tee -a ~/.profile |
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/bash | |
# | |
# Configure sshd on MinGW for Windows | |
# Create host keys | |
ssh-keygen -f /etc/ssh/ssh_host_rsa_key -N '' -t rsa | |
ssh-keygen -f /etc/ssh/ssh_host_dsa_key -N '' -t dsa | |
ssh-keygen -f /etc/ssh/ssh_host_ecdsa_key -N '' -t ecdsa | |
ssh-keygen -f /etc/ssh/ssh_host_ed25519_key -N '' -t ed25519 |
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
http://study.marearts.com/2017/09/opencv-tip-calculate-overlap-percent.html | |
Mat canvas(100, 100, CV_8UC3); | |
canvas.setTo(0); | |
Rect rectA(10, 5, 50, 60); | |
Rect rectB(40,40,30, 40); | |
Rect andRect_overlap = (rectA & rectB); | |
Rect orRect_whole = (rectA | rectB); | |
cout << "rect A info. : " << rectA << endl; |
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
#include <cstring> | |
#include <ctime> | |
#include <iostream> | |
#include <memory> | |
#include <string> | |
#include <openssl/asn1.h> | |
#include <openssl/bio.h> | |
#include <openssl/conf.h> | |
#include <openssl/err.h> | |
#include <openssl/pem.h> |
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
#It's not directly mentioned in the documentation on how to do this, so here you go. This command will tunnel everything including DNS: | |
sshuttle --dns -vr [email protected] 0/0 --ssh-cmd 'ssh -i /your/key/path.pem' |
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
#include <stdio.h> | |
#include <unistd.h> | |
#include <modbus.h> | |
#include <string.h> | |
#include <errno.h> | |
#include <sys/ioctl.h> | |
#include <linux/serial.h> | |
#include <asm/ioctls.h> | |
#define NB_REGS 2 |
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
//To compile: | |
//cc vlcsms.c -o vlcsms -lvlc | |
//This source is by Tim Sheerman-Chase and it is released as public domain. | |
#include <stdio.h> | |
#include <stdint.h> | |
#include <stdlib.h> | |
#include <unistd.h> | |
#include <inttypes.h> | |
#include <vlc/vlc.h> |
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
#include <glob.h> | |
#include <vector> | |
#include <string> | |
inline std::vector<std::string> glob(const std::string& pat){ | |
using namespace std; | |
glob_t glob_result; | |
glob(pat.c_str(),GLOB_TILDE,NULL,&glob_result); | |
vector<string> ret; | |
for(unsigned int i=0;i<glob_result.gl_pathc;++i){ | |
ret.push_back(string(glob_result.gl_pathv[i])); |
NewerOlder