Skip to main content

Prof.Li's Python Tools

道法自然

pip install -U shnu-llq-tools

sample code as follows: ``import numpy as np import pandas as pd

def create_name(name='姓名', rows=40): xing = '赵钱孙李周吴郑王冯陈褚蒋沈韩杨朱秦尤许何吕施张孔曹严华金魏陶姜戚谢邹喻柏窦章苏潘葛奚范彭郎鲁韦昌马苗方俞任袁柳' ming = "群平风华正茂仁义礼智媛强天霸红和丽平世莉界中华正义伟岸茂盛繁圆一懿贵妃彭习嬴政不韦近荣群智慧睿兴平风清扬自成世民嬴旺品网红丽文天学与翔斌霸学花文教学忠谋书" x = np.random.choice(list(xing), (rows, 1)) m = np.random.choice(list(ming), (rows, 2)) nm = np.hstack((x, m)) df = pd.DataFrame(nm) dff = pd.DataFrame() df[2] = df[2].apply(lambda x: ('', x)[np.random.randint(0, 2)]) dff[name] = df[0] + df[1] + df[2]

return dff[name]

def create_columns(column_list, value_list, rows=40): size = (rows, len(column_list)) if type(value_list[0]) == int and len(value_list) == 2: return pd.DataFrame(np.random.randint(*value_list, size=size), columns=column_list) else: return pd.DataFrame(np.random.choice(value_list, size=size), columns=column_list)

def generate(rows=40): return pd.concat([ create_name('姓名', rows), create_columns(['性别'], ['男', '女'], rows), create_columns(['学校'], ['清华大学', '北京大学', '复旦大学', '上海师大', '上海交大'], rows), create_columns(['班级'], ['计算机科学与技术', '人工智能', '数据科学'], rows), create_columns(['英语', '政治','线代', '概率'], [20, 100], rows), create_columns(['高数', '专业课', '表达能力','面试'], [30, 150], rows)], axis=1)

if name == 'main': print(generate(100)) ``

hah

Metadata

Release files for shnu-llq-tools 1.0.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for shnu-llq-tools 1.0.3
File Size Uploaded Provenance Actions
shnu llq tools-1.0.3.tar.gz 5.4 kB Without provenance Details for shnu llq tools-1.0.3.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for shnu-llq-tools 1.0.3
File Interpreter ABI Platform Actions
shnu_llq_tools-1.0.3-py3-none-any.whl Python 3 none any Details for shnu_llq_tools-1.0.3-py3-none-any.whl

Total release size: 12.8 kB

Release files / shnu llq tools-1.0.3.tar.gz

Download URL shnu llq tools-1.0.3.tar.gz
Size 5.4 kB
Tags Source
SHA-256 checksum
How to use checksums
23cf1403b1e2461fbec9882495565c0ec0e3ebd0656d60ae6a3856895ef1e9cb
BLAKE2b-256 checksum
How to use checksums
02c9b5b0f36841b037656e25070e70e1bab1dc7ce05c3930dbaff5b16b83467a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.10.4

Release files / shnu_llq_tools-1.0.3-py3-none-any.whl

Download URL shnu_llq_tools-1.0.3-py3-none-any.whl
Size 7.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
36a3d0060c7f2cdf3c7b46db77e2861f14226f1367543a15c38e01d18f82f4a8
BLAKE2b-256 checksum
How to use checksums
11026c08a88d7270ae5f5cb015e50c76a35570953c1909a958be362f3fcab3d1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.10.4

Security for shnu-llq-tools 1.0.3

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page