2017年10月11日

python 的文件处理

摘要: 待更 一、linux 用户权限 drwxr-xr-x d:目录 rwx:当前用户的权限 r-x :所在用户组的权限 --x:外部用户访问权限 二、文件打开 open(name, mode, buf) :name 文件路径, mode 文件打开方式, 缓冲 buffering大小。注意模式: r 以只 阅读全文

posted @ 2017-10-11 18:35 Lemo_wd 阅读(310) 评论(0) 推荐(0)

python 的正则表达式

摘要: 一、正则的基本概念 1. 字符串的一般操作 测试文件 # imooc.txt 查询特定字符 输出 2.使用正则 像上面那样,每次都需要做一个函数去解析字符串很麻烦,于是考虑做成一个简单的规则。使用单个字符串来描述符合某个语法规则的字符串 二、正则表达式的使用 1.流程图 使用正则 输出 注意:也可以 阅读全文

posted @ 2017-10-11 01:48 Lemo_wd 阅读(315) 评论(0) 推荐(0)

2017年10月10日

安装 powerline

摘要: 使用说明: https://powerline.readthedocs.io/en/latest/usage.html ~ vim,在 .vimrc 中添加配置 ~ bash shell,在 .bashrc 中添加配置 阅读全文

posted @ 2017-10-10 20:46 Lemo_wd 阅读(157) 评论(0) 推荐(0)

bash 的相关配置

摘要: bash 参数自动补全 请安装 bash-completion bash 提示符 说明:参考文档 1. 简洁风格 效果 2. 多种颜色混合 效果 阅读全文

posted @ 2017-10-10 17:40 Lemo_wd 阅读(274) 评论(0) 推荐(0)

2017年10月9日

manjaro 设置 国内源

摘要: 注意,如果安装过程中出现无法连接服务,请参看第 4条。 1. 设置官方镜像源(包括 core, extra, community, multilib ) $ sudo pacman-mirrors -i -c China -m rank //更新镜像排名 $ sudo pacman -Syy //更 阅读全文

posted @ 2017-10-09 13:22 Lemo_wd 阅读(57593) 评论(8) 推荐(1)

2017年10月8日

vbox 的 ova 提取vmdk 与 vdi 以及扩容

摘要: 原文: http://blog.csdn.net/flm2003/article/details/11980863 1. 从ova提取vmdk: tar xvf oldImage.ova => oldImage.ovf oldImage.vmdk 2. vmdk转换为vdi: VBoxManage 阅读全文

posted @ 2017-10-08 20:03 Lemo_wd 阅读(672) 评论(0) 推荐(0)

2017年10月7日

ssh 管理 linux登录远程服务器

摘要: 使用 ssh 免秘登录方式 (还可以使用 ssh-agent 缓存密码) 客户端:1. 生成公钥和私钥 ssh-keygen 一般不需要对私钥设置口令(passphrase),如果担心私钥的安全,这里可以设置一个。 运行结束以后,在$HOME/.ssh/目录下,会新生成两个文件:id_rsa.pub 阅读全文

posted @ 2017-10-07 15:01 Lemo_wd 阅读(378) 评论(0) 推荐(0)

2017年10月3日

solus 系统 - 更新软件源

摘要: 清华稳定源sudo eopkg ar Tuna https://mirrors.tuna.tsinghua.edu.cn/solus/shannon/eopkg-index.xml清华不稳定源sudo eopkg ar UTuna https://mirrors.tuna.tsinghua.edu. 阅读全文

posted @ 2017-10-03 08:38 Lemo_wd 阅读(1908) 评论(0) 推荐(0)

2017年10月2日

python 解释器

摘要: 原文 Python 能让程序紧凑, 可读性增强. 用 Python 写的程序通常比同样的 C, C++ 或 Java 程序要短得多, 这是因为以下几个原因: 高级数据结构使你可以在单独的语句中也能表述复杂的操作; 语句的组织依赖于缩进而不是 开始/结束 符 (类似 C 族语言的 {} 符号或 Pas 阅读全文

posted @ 2017-10-02 21:59 Lemo_wd 阅读(355) 评论(0) 推荐(0)

python 中的 print 函数与 list函数

摘要: print() 函数: 传入单个参数时默认回车换行,关键词 end 可以用来避免输出后的回车(换行), 或者以一个不同的字符串结束输出。 >>> a, b = 0, 1 >>> while b < 1000: ... print(b, end=',') ... a, b = b, a+b ... 1 阅读全文

posted @ 2017-10-02 21:57 Lemo_wd 阅读(1434) 评论(0) 推荐(0)

导航