摘要: #!/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)? " 阅读全文
posted @ 2018-08-16 15:56 东宫得臣 阅读(215) 评论(0) 推荐(0) 编辑
摘要: 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 阅读全文
posted @ 2018-08-08 17:33 东宫得臣 阅读(1102) 评论(0) 推荐(0) 编辑
摘要: #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 阅读全文
posted @ 2018-08-05 14:22 东宫得臣 阅读(415) 评论(0) 推荐(0) 编辑
摘要: //f(x;W,c,w,b)=w*max{0, W*x+c}+b #include <iostream>#include <vector>#include <algorithm> template <class T>double tanh(T& z) { double ret; ret = (exp 阅读全文
posted @ 2018-06-23 13:31 东宫得臣 阅读(156) 评论(0) 推荐(0) 编辑
摘要: 1 #!/usr/bin/env python3 2 3 # -*- coding: UTF-8 -*- 4 5 import pandas as pd 6 import os 7 import re 8 9 if __name__ == '__main__': 10 Folder_Path = ' 阅读全文
posted @ 2018-06-13 13:16 东宫得臣 阅读(2248) 评论(0) 推荐(0) 编辑
摘要: 调用函数时候,传入脚本路径名称或者具体命令。 int shell_call(std::string &cmdstr) { enum { maxline=100 }; char line[maxline]; FILE *fpin; int ret; if((fpin = popen(cmdstr.c_ 阅读全文
posted @ 2018-04-26 09:09 东宫得臣 阅读(4672) 评论(0) 推荐(0) 编辑
摘要: #include <iostream>#include <cstdlib> template<class T>void changeLength1D(T*& a, int oldLength, int newLength) { if(newLength<0) { std::cout<<"new le 阅读全文
posted @ 2018-04-16 22:11 东宫得臣 阅读(248) 评论(0) 推荐(0) 编辑
摘要: #include <iostream>#include <sstream>#include <fstream>#include <cmath>#include <iterator>#include <algorithm> template<class T>class linearList { pub 阅读全文
posted @ 2018-04-16 21:02 东宫得臣 阅读(213) 评论(0) 推荐(0) 编辑
摘要: 工作中遇到的需求,****代表标签数据别的信息: D01 ******** 1 ******** D01 ******** 2 ******** D01 ******** 3 ******** D01 ******** 4 ******** D02 ******** 1 ******** D02 * 阅读全文
posted @ 2018-04-01 11:21 东宫得臣 阅读(205) 评论(0) 推荐(0) 编辑
摘要: #include <stdio.h>#include <stdlib.h>#include <arpa/inet.h>#include <sys/types.h>#include <sys/socket.h>#include <sys/time.h>#include <netinet/in.h>#i 阅读全文
posted @ 2018-03-31 14:48 东宫得臣 阅读(191) 评论(0) 推荐(0) 编辑