上一页 1 ··· 7 8 9 10 11 12 13 14 15 下一页

2021年3月10日

ubuntu自定义命令

摘要: 1. 定义自己的命令,例:定义 Astro,表示登录一个叫“Astro"的服务器 可以建一个文件夹,专门储存自己的脚本 mkdir my-commands 然后在该文件夹内,创建脚本 vi Astro 在这个脚本中写下内容: #!/bin/bash #即默认用bash执行这个脚本 sshpass - 阅读全文

posted @ 2021-03-10 14:13 luyi07 阅读(706) 评论(0) 推荐(0) 编辑

c++ 读取标准输入中的一行,然后从行首提取数字、字符串

摘要: #include<iostream>using namespace std;#include<string>#include<sstream> int main(){ int Np, Nn; cout<<"input a line: "<<endl; string line; getline(cin 阅读全文

posted @ 2021-03-10 10:49 luyi07 阅读(586) 评论(0) 推荐(0) 编辑

2021年2月6日

Python 函数参数使用

摘要: 参考来源:Magnus Lie Hetland 《Python基础教程》 1. 自定义函数 def hello( name ): return 'Hello, ' + name + '!' 可以判断一个对象是不是函数: callable( hello ) 如果是函数,就会返回True,否则会返回Fa 阅读全文

posted @ 2021-02-06 22:44 luyi07 阅读(98) 评论(0) 推荐(0) 编辑

2021年1月27日

Python 文件操作

摘要: 参考来源:Magnus Lie Hetland 《Python基础教程》 1. open f = open('somefile.txt') # 文件名是唯一必不可少的参数,返还一个文件对象 2. 文件模式 类似于c++,open的参数mode(默认是 r 模式,即只读) 'r' 'w' 'x' 独占 阅读全文

posted @ 2021-01-27 23:04 luyi07 阅读(128) 评论(0) 推荐(0) 编辑

2020年9月25日

deepin wine 安装 QQ/微信

摘要: 参考文献:https://github.com/wszqkzqk/deepin-wine-ubuntu.git 中的 README.md 文件。 1. 克隆 deepin-wine-ubuntu git clone https://github.com/wszqkzqk/deepin-wine-ub 阅读全文

posted @ 2020-09-25 17:58 luyi07 阅读(952) 评论(0) 推荐(0) 编辑

jupyter notebook 知识收集

摘要: 1. 生成 pdf 虽然 jupyter notebook 有 File -> Download as -> pdf,但是总是不成功。最简单粗暴而有效的还是 Chrome 浏览器 Ctr + P,还可以调节页眉。 2. 插入空白行 &nbsp; 3. 标题、小标题 在markdown里, #哈 一级 阅读全文

posted @ 2020-09-25 14:54 luyi07 阅读(155) 评论(0) 推荐(0) 编辑

2020年5月23日

git:版本管理器

摘要: 1. 安装git sudo apt-get install git 需要设置这台电脑上的 git 用户名与邮箱 git config --global user.name "xx" git config --global user.email "xxx@abc.edu.cn" 2. 创建版本库(re 阅读全文

posted @ 2020-05-23 14:38 luyi07 阅读(219) 评论(0) 推荐(0) 编辑

2020年5月20日

构建基本 bash 脚本

摘要: 一 第1个脚本 #!/bin/bash # 这一行表示用 bash 执行 # test # 这一行以及此后以 # 开头的行都是注释,不会被 shell “解释” date # 显示时间 who # 显示当前在线的用户 写好上面的文件,命名"test.sh",可以如下执行脚本 bash test.sh 阅读全文

posted @ 2020-05-20 13:15 luyi07 阅读(149) 评论(0) 推荐(0) 编辑

改变文件权限

摘要: 参考自《Linux命令行与shell脚本编程大全》7.3-7.4 一 文件权限 用 ls -l 可以查看文件、目录、设备的权限,比如 -rw-r--r-- 1 luyi luyi 42 5月 1 22:48 cal5.sh 第一个字符: - 代表文件 d 代表目录 后面的字符3个一组,各组分别对应: 阅读全文

posted @ 2020-05-20 12:35 luyi07 阅读(252) 评论(0) 推荐(0) 编辑

2020年5月13日

输入输出重定向

摘要: >, < 表示数据的流动方向,比如 command < inputfile #表示把 inputfile 中的内容作为标准输入(STDIN)提供给 command command > outputfile #表示把 command 产生的标准输出(STDOUT)导进 outputfile 中保存。如 阅读全文

posted @ 2020-05-13 01:54 luyi07 阅读(295) 评论(0) 推荐(0) 编辑

上一页 1 ··· 7 8 9 10 11 12 13 14 15 下一页

导航