- 博客(19)
- 收藏
- 关注
原创 Perl - use strict
Perl - use strictWhere to use?Condition 1: too much lines in your script;Condition 2: can not find out the reason for error.Why to use?Reason 1: help you to find out some easy errors like spelling mistakes; (eg. you claimed ‘apple’ but you used ‘aple’
2021-11-25 12:25:41
426
原创 VASP自旋(NM、AM、AFM)
参考网址:http://blog.chinaunix.net/uid-7726704-id-2045392.html【参数设置】ISPIN: 1(默认无自旋)2(自旋) MAGMOM: 初始磁距,默认值为Nion*1 ALGO: (版本4.5+) 电子优化的算法:Normal:(对应IALGO=38,blocked Davidson方法)Very_Fast:(对应IALGO=48,RMM-DIIS算法)Fast: 对应上面两种算法混合IALGO:具体电子优化算法(对于4.5+版本,
2021-09-07 10:55:46
14752
原创 Exception hierarchy (异常继承关系)
Exception hierarchy (异常继承关系)###########################################################################BaseException (基本异常) +-- SystemExit (系统退出) +-- KeyboardInterrupt (键盘中断) +-- GeneratorExit (生...
2019-12-23 05:03:56
225
原创 random in Python
import random# 0-1 浮点数random.random()# 0-10 整数(包括0和100)random.randint(1, 100)# 1.2-2.5 浮点数random.uniform(1.2, 2.5)# 0-100 间隔5整数random.randrange(0, 100, 5)# apple 中随机取一个元素random.choice('...
2019-11-28 12:27:37
246
原创 Keywords, datatypes, escape sequences, string formats and operators in Python
# logicand, not, or# branchif, elif, else# loopwhile, for# definitiondef, global, # jump-tobreak, continue, return# importfrom, import# othersdel, as, with, assert, pass, yield, except, p...
2019-11-28 04:18:37
105
原创 List in Python
| append(...) | L.append(object) -- append object to end | | count(...) | L.count(value) -> integer -- return number of occurrences of value | | extend(...) | L.extend(ite...
2019-11-27 11:02:59
186
原创 Python中help()的用法
系统windows用法Enter your cmdEnter your pythonInput help() (备注:括号中是你想要查询的内容)
2019-11-26 13:27:33
412
原创 Python中SyntaxError: invalid syntax
This error means you have something like a missing ( or " or similar syntax error on that line or aboveit.When this error occurs, please start at the line it mentions and check that it’s right, then...
2019-11-25 21:11:53
287
原创 Websites for learning programming
bitbucket.orggithub.comgitorious.orglaunchpad.netsourceforge.netfreecode.com
2019-11-25 12:52:33
147
原创 Python中Input your own numbers with raw_input()
intint(raw_input)floatfloat(raw_input)
2019-11-25 12:26:35
98
原创 powershell的进入和退出
进入for Windows OSInput powershell in cmd.退出Input exit in cmd.
2019-11-25 12:00:48
2182
原创 Python中file对象的readline()方法
This method will return the \n at the end of that line. If you don’t want this, plead add a ‘,’ at the end of print.
2019-11-25 11:40:17
695
原创 Python中file对象的seek()方法
语法fileObject.seek(offset[, whence])参数offset----偏移量(相对于文件某个位置偏移的字节数)whence----offset的辅助(可选,默认值为 0)0:从文件头开始1:从文件当前位置开始2:从文件尾开始返回值成功:返回新的文件位置失败,返回 -1...
2019-11-25 11:29:08
960
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人