最远的旅行,是从自己的身体到自己的心,是从一个人的心到另一个人的心。坚强不是面对悲伤不流一滴泪,而是擦干眼泪后微笑面对以后的生活。- 宫崎骏 《风之谷》 # number and text Determines if a string is palindrome, such as abcba Find all even number location letter in a string, such as "abcd" =>...

# maven compiler maven project 在 vscode settings.json 中设定了 runtimes, bottom status bar 仍然显示使用 SDK 1.5, 并且无法使用高版本特性 12345678910"java.configuration.runtimes": [ { "name": "JavaSE-13", "path": "C:/Program...

I can’t be a savior. If I save one’s life, i am required to save others. Once I fail to save everyone, the world will call me hypocritical. - Strive to live in this world # 下载 html 并转换为...

# 测试 12345678910111213141516171819202122232425262728293031323334import inspectdef a(a, b=0, *c, d, e=1, **f): passaa = inspect.signature(a)print("inspect.signature(fn)是: %s" % aa)print("inspect.signature(fn)的类型是: %s" %...

# 分词 1234567891011121314import jiebaseg_list = jieba.cut("我来到北京清华大学", cut_all=True)print("Full Mode: " + "/ ".join(seg_list)) # 全模式seg_list = jieba.cut("我来到北京清华大学", cut_all=False)print("Default Mode: " +...

# load csv 123456789101112131415161718192021222324252627282930313233343536373839import pandas as pdimport matplotlib.pyplot as pltdf = pd.read_csv('data.csv')# 打印前几条数据# print(df.head())''' Date Value0 2016-06-30 64.01 2016-05-31 163.02 2016-04-30 118.03...

# 创建对象 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051521. 通过传递一个list对象来创建一个Series,pandas会默认创建整型索引import pandas as pdimport numpy as nps = pd.Series([1,3,5,np.nan])# print(s)# 0 1.0# 1 3.0# 2 5.0# 3 NaN# dtype: float642. 通过传递一个numpy...

As for those people, the truth doesn’t count, what they only care is that the accepted truth must be advantageous to them - Strive to live in this world # doctest 文档测试 Python 内置的 “文档测试”(doctest)模块可以直接提取注释中的代码并执行测试。doctest 严格按照 Python...

# UnboundLocalError 1234567891011121314151617181920212223242526272829a = 1def func(): a += 1 print(a)func()# UnboundLocalError: local variable 'a' referenced before assignmentimport randomdef func(ok): if ok: a = random.random() else: import random a = random.randint(1,10) return...

转载 What is an AS2 MDN? # Overview An MDN is an electronic return receipt which a trading partner can optionally request during an AS2 interchange. The use of MDNs help enforce data integrity and non-repudiation in AS2. In this post, we’ll talk more about the value of issuing an AS2 MDN, what...