scipy.py 2.6 KB
Newer Older
F
feilong 已提交
1
# -*- coding: UTF-8 -*-
F
feilong 已提交
2
# 作者:huanhuilong
F
feilong 已提交
3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29
# 标题:Python SciPy
# 描述:正确打印 SciPy 中英对照介绍,输出:
#
# # Python 科学计算软件包
# # Scientific computing tools for Python
#
# * SciPy 指向一组相关但互相独立的软件包
# * SciPy refers to several related but distinct entities:
#
# * 描述:
#   * SciPy 本身也是一个Python库, 属于 SciPy 技术栈的一员, 提供了许多数值计算程序.
#   * The SciPy ecosystem, a collection of open source software for scientific computing in Python.
#   ...
# * 相关Python 软件栈:
#   * Python
#   * NumPy
#   ...


def test():
    sci_py_meta = {
        "title": "Scientific computing tools for Python",
        "title_zh_cn": "Python 科学计算软件包",
        "sub_title": 'SciPy refers to several related but distinct entities:',
        "sub_title_zh_cn": 'SciPy 指向一组相关但互相独立的软件包',
        "desc": [
            'The SciPy library, one component of the SciPy stack, providing many numerical routines.',
U
u010280923 已提交
30 31 32
            'Several conferences dedicated to scientific computing in Python - SciPy, EuroSciPy, and SciPy.in.',
            'The community of people who use and develop this stack.',
            'The SciPy ecosystem, a collection of open source software for scientific computing in Python.',
F
feilong 已提交
33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65
        ],
        "desc_zh_ch": [
            'SciPy 本身也是一个Python库, 属于 SciPy 技术栈的一员, 提供了许多数值计算程序.',
            '许多 Python 相关的科学计算会议,例如  SciPy, EuroSciPy, 和 SciPy 等',
            '使用和开发这组技术栈的人',
            'SciPy 生态是指一组开源 Python 科学计算软件',
        ],
        "packages": [
            "Python", "NumPy", "SciPy library", "Matplotlib", "pandas", "SymPy", "NetworkX", "scikit-image",
            "scikit-learn", "h5py", "PyTables", "IPython", "Jupyter", "Cython", "Dask", "Joblib", "IPyParallel",
            "nose", "numpydoc"
        ]
    }

    print()
    print("# {}".format(sci_py_meta['title_zh_cn']))
    print("# {}".format(sci_py_meta['title']))
    print()

    print("* {}".format(sci_py_meta['sub_title_zh_cn']))
    print("* {}".format(sci_py_meta['sub_title']))
    print()

    print("* 描述:")
    for i in range(0, len(sci_py_meta['desc'])):
        print("  * {}".format(sci_py_meta['desc_zh_ch'][i]))
        print("  * {}".format(sci_py_meta['desc'][i]))
        print()

    print("* 相关Python 软件栈:")
    for pkg in sci_py_meta['packages']:
        print("  * {}".format(pkg))

F
feilong 已提交
66

F
feilong 已提交
67
if __name__ == '__main__':
F
feilong 已提交
68
    test()