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 <opencv2/core.hpp> | |
static bool fixBound(cv::Rect &rect, const cv::Size &roi) { | |
bool ok = true; | |
if (rect.width <= 0) { | |
ok = false; | |
rect.width = roi.width; | |
} | |
if (rect.height <= 0) { | |
ok = false; |
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
// | |
// Created by prostoichelovek on 14.08.19. | |
// | |
#ifndef NEURALNET_HPP | |
#define NEURALNET_HPP | |
#include <string> | |
#include <utility> | |
#include <vector> |
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 <iostream> | |
enum LogType { | |
INFO, WARNING, ERROR | |
}; | |
template<typename T> | |
void coutMany(T t) { | |
std::cout << t << " " << std::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 <iostream> | |
#include <opencv2/opencv.hpp> | |
#include <opencv2/dnn.hpp> | |
#include <opencv2/face.hpp> | |
#include <opencv2/ml.hpp> | |
using namespace std; | |
using namespace cv; |
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 <iostream> | |
#include <ctime> | |
#include <vector> | |
#include <dlib/svm.h> | |
using namespace std; | |
using namespace dlib; | |
int main() { |
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_minimum_required(VERSION 3.11) | |
project(dlibFaces) | |
set(CMAKE_CXX_STANDARD 11) | |
set(CMAKE_CXX_STANDARD_REQUIRED ON) | |
add_subdirectory($ENV{HOME}/dlib dlib_build) | |
find_package(OpenCV REQUIRED) | |
include_directories(${OpenCV_INCLUDE_DIRS}) |
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
#!/usr/bin/env bash | |
cd /media/`whoami`/rootfs/ | |
cd /etc/wpa_supplicant/ | |
echo "" >> wpa_supplicant.conf | |
echo "network={" >> wpa_supplicant.conf | |
echo " ssid=\"${1}\"" >> wpa_supplicant.conf | |
echo " psk=\"${2}\"" >> wpa_supplicant.conf | |
echo " key_mgmt=WPA-PSK" >> wpa_supplicant.conf | |
echo "}" >> wpa_supplicant.conf |
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
#!/usr/bin/env bash | |
while read p; do | |
word=`echo $p | sed 's/ .*//'` | |
if [[ ${word} == "" ]]; then | |
continue | |
fi | |
if [[ ${word} == *"("* ]]; then | |
continue |
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
vector<int> string2int(const string &str) { | |
vector<int> res; | |
string temp = str; | |
map<string, int> oneDgtNums = {{"ноль", 0}, | |
{"один", 1}, | |
{"два", 2}, | |
{"три", 3}, | |
{"четыре", 4}, | |
{"пять", 5}, | |
{"шесть", 6}, |
NewerOlder