Skip to content

Instantly share code, notes, and snippets.

View aemonair's full-sized avatar

Air aemonair

View GitHub Profile
@aemonair
aemonair / expect ssh
Last active November 21, 2023 09:26
expect
#!/usr/bin/expect
set timeout 30
set host "127.0.0.1"
set username "air"
set password "password"
trap {
set rows [stty rows]
set cols [stty columns]
for (( i = 0; i < 600; i++ ));do
thistime=$(date "+%H:%M:%S" -d "00:00:00 $i second")
echo $thistime >> log
done
for (( i = 0; i < 600; i++ ));do
thistime=$(date "+%H:%M:%S" -d "00:00:00 $i second")
echo $thistime
echo $thistime >> result.log
0.导出环境
#使用pip导出当前环境所有依赖包信息文件
pip3 freeze > req.txt
导出 安装包
# 下载所有依赖包到本地
pip3 download -r req.txt -d packages
(可选 -i https://pypi.douban.com/simple)
1.安装python3.7
2.安装pycharm
3.搭建环境:
@aemonair
aemonair / copy.sh
Created January 10, 2020 02:58
copy file to many files
i=0
F=new
while [ $i -le 30 ]
do
cp -vf old.csv $F$i.csv
let i+=1
done
@aemonair
aemonair / cc.sh
Last active November 17, 2020 05:41
#!/bin/sh
CC=gcc
GPP=g++
PRONAME=$0
if [ -z $1 ];then
echo -e "\033[0;31mUsage : $PRONAME < C-Programs File's name >\033[0m"
exit 1
fi