摘要: #!/bin/bashcat user.txt | while read linedo user=$(echo $line | cut -d ' ' -f1) passwd=$(echo $line | cut -d ' ' -f2) useradd -r -m -s /bin/bash $user 阅读全文
posted @ 2018-11-12 09:42 瞬_冷 阅读(720) 评论(0) 推荐(0)
摘要: 阅读全文
posted @ 2018-10-29 14:23 瞬_冷 阅读(2400) 评论(0) 推荐(0)
摘要: 1.首先安装ffmpeg apt-get install ffmpeg 2.安装opencv对ffmeg的依赖 # for Compiling OpenCV with ffmpeg support apt-get install build-essential apt-get install cma 阅读全文
posted @ 2018-10-19 16:48 瞬_冷 阅读(1485) 评论(0) 推荐(0)
摘要: 1.首先通过fdisk -l 查看磁盘的属性,找到要添加的磁盘名称(Disk /dev/sda) 2.使用fdisk将磁盘进行逻辑分区 fdisk /dev/sda m来查看命令帮助 n添加一张新的partition,之后都是划分几个分区,以及分区的大小,不过这些都可以使用默认的值,然后就可以直接按 阅读全文
posted @ 2018-10-19 15:04 瞬_冷 阅读(9466) 评论(0) 推荐(0)
摘要: 第一步:修改主机名: vim /etc/hostname 第二步:修改网络解析名称: vim /etc/hosts 第三步:重启网络配置服务(或者刷新dns): sudo /etc/init.d/networking restart(sudo /etc/init.d/dns-clean start) 阅读全文
posted @ 2018-10-12 10:31 瞬_冷 阅读(875) 评论(0) 推荐(0)
摘要: 1. create a 1G file for the swap. sudo fallocate -l 1G /swapfile we can verify that the correct amount of space was reserved by typing: ls -lh /swapfi 阅读全文
posted @ 2018-10-11 13:53 瞬_冷 阅读(1474) 评论(0) 推荐(0)
摘要: 将同样的一张图(101*156),采用两种不同的方式进行缩放填充,带来的像素差异: 1.先填充后缩放 def resize_1(img): height, width, channel = img.shape temp = np.zeros((height,height,3),np.uint8) s 阅读全文
posted @ 2018-10-10 15:13 瞬_冷 阅读(1299) 评论(0) 推荐(0)
摘要: #include<iostream>using namespace std;int main() { char str[20] = "cd大家好df"; //std::cin >> str; char cstr[20]; int n, cn; n = 0; cn = 0; while (str[n] 阅读全文
posted @ 2018-04-23 17:59 瞬_冷 阅读(3301) 评论(0) 推荐(0)
摘要: 安装requests的方法:sudo pip install requests 当碰到requests链接https的时候报SSL错误的时候使用如下解决: 1:将python的pip 版本升级到9.0.3以上。然后运行安装request的秘钥认证就可以了:pip install requests[s 阅读全文
posted @ 2018-04-10 17:56 瞬_冷 阅读(1011) 评论(0) 推荐(0)