08 2018 档案
摘要:#include <functional> template <class T1, class T2, class T3>void outer_product(std::vector<T1> &inst1, std::vector<T2> &inst2, std::vector<std::vecto
阅读全文
摘要:template <class T1, class T2>double Pearson(std::vector<T1> &inst1, std::vector<T2> &inst2) { if(inst1.size() != inst2.size()) { std::cout<<"the size
阅读全文
摘要:#include <iostream>#include <vector>#include <numeric> int main() { double a[]={1, 3, 5.4}; double b[]={1, 5, 7}; std::vector<double> v_a, v_b; for(si
阅读全文
摘要:#include <string>#include <iostream>#include <stack> int main() { std::string str="hello"; std::stack<char> reverse_str; std::cout<<str<<std::endl; fo
阅读全文
摘要:template <class T1, class T2>double ManhattanDistance(std::vector<T1> &inst1, std::vector<T2> &inst2) { if(inst1.size() != inst2.size()) { std::cout<<
阅读全文
摘要:template <class DataType1, class DataType2>double EuclideanDistance(std::vector<DataType1> &inst1, std::vector<DataType2> &inst2) { if(inst1.size() !=
阅读全文
摘要:正态分布3σ原则,把3倍方差之外的点设想为噪声数据来排除。 归一化,将数据经过处理之后限定到一定的范围内,一般都会将数据限定到[0,1]。 #include <iostream>#include <string>#include <vector>#include <algorithm>#includ
阅读全文
摘要:#include <iostream>#include <fstream>#include <vector>#include <string> int main() { std::vector<std::string> v_ip; v_ip.clear(); v_ip.push_back("192.
阅读全文
摘要:#!/usr/bin/expect set ip [lindex $argv 0] set password [lindex $argv 1] spawn ssh -o ConnectTimeout=15 -l root ${ip} "hostname" expect { "(yes/no)? "
阅读全文
摘要:1 #!/usr/bin/env python3 2 3 # -*- coding: UTF-8 -*- 4 5 from bs4 import BeautifulSoup 6 import operator 7 import os,shutil 8 import re 9 10 def proce
阅读全文
摘要:#include <iostream>#include <valarray> template<class T> class Slice_iter { std::valarray<T>* v; std::slice s; size_t curr; T& ref(size_t i) const { r
阅读全文