上一页 1 ··· 4 5 6 7 8 9 10 11 12 ··· 17 下一页

2018年7月19日

python 生成随机字符串 和随机数字

摘要: 生成随机字符串: 生成随机浮点数 random.uniform(10, 20) 生成随机整数 random.randint(12, 20) 阅读全文

posted @ 2018-07-19 18:19 游荡的鱼 阅读(339) 评论(0) 推荐(0) 编辑

python 写入文件

摘要: write writelines 以上没有区别 但是writelines 可以以列表作为参数: 但是"hello world!" 和 "first test" 并 不会 自动换行 需要自己加入换行符: read() readline() readlines() a_read:'hello world 阅读全文

posted @ 2018-07-19 13:39 游荡的鱼 阅读(152) 评论(0) 推荐(0) 编辑

python 差集

摘要: 做差集 a=["a","b","c"] b=["b","d"] set(a) set(b) //把a,b转换成集合 a中有 b中没有的 set(a) set(b) {'a','c'} set(a).difference(set(b)) {''a','c''} b中有 a中没有的 set(b) set 阅读全文

posted @ 2018-07-19 11:19 游荡的鱼 阅读(9696) 评论(0) 推荐(0) 编辑

2018年7月14日

python unittest使用

摘要: uinittest使用 unittest.TestCase 实例: 首先 unittest.TestCase 中测试用例方法 需要用test开头,后面调用 unittest.main()就会自动执行这些用例方法 unittest.main() 是会按顺序执行 Test1类里的函数的,但是又和普通的类 阅读全文

posted @ 2018-07-14 13:58 游荡的鱼 阅读(779) 评论(0) 推荐(0) 编辑

2018年6月30日

python windows 打印乱码报错

摘要: “UnicodeEncodeError: 'gbk' codec can't encode character '\xa9' in position 37931” 添加: import sys import io sys.stdout = io.TextIOWrapper(sys.stdout.bu 阅读全文

posted @ 2018-06-30 01:35 游荡的鱼 阅读(146) 评论(0) 推荐(0) 编辑

2018年6月28日

安装chales问题

摘要: user installations are disable via policy on the machine 1.在运行里输入gpedit.msc; 2.计算机配置管理 管理模板 windows组件 windows Installer 禁止用户安装; 3.把该项设置成未配置 激活: // Cha 阅读全文

posted @ 2018-06-28 00:03 游荡的鱼 阅读(140) 评论(0) 推荐(0) 编辑

2018年6月26日

gvim json格式化文本显示

摘要: 编辑 _vimrc,添加 command! JsonFormat :execute '%!D:/Python/Python35/python m json.tool' 打开文本:输入":JsonFormat" 阅读全文

posted @ 2018-06-26 19:01 游荡的鱼 阅读(136) 评论(0) 推荐(0) 编辑

2018年6月24日

gvim 冲突快捷键

摘要: 取消 ctrl+F为search 找到gvim.exe目录下mswin.vim 文件 注释以下内容 " if has("gui") " " CTRL F is the search dialog " noremap :promptfind " inoremap :promptfind " cnore 阅读全文

posted @ 2018-06-24 19:19 游荡的鱼 阅读(197) 评论(0) 推荐(0) 编辑

keepass 用git 更新文件

摘要: windows git use keepass 安装git: 安装chocolatey 在CMD下管理员运行以下命令: @"%SystemRoot%\System32\WindowsPowerShell\v1.0\powershell.exe" NoProfile InputFormat None 阅读全文

posted @ 2018-06-24 14:57 游荡的鱼 阅读(341) 评论(0) 推荐(0) 编辑

gvim 开启全屏显示

摘要: vim _vimrc中添加 autocmd GUIEnter simalt ~x 阅读全文

posted @ 2018-06-24 04:07 游荡的鱼 阅读(475) 评论(0) 推荐(0) 编辑

上一页 1 ··· 4 5 6 7 8 9 10 11 12 ··· 17 下一页

导航