Name | mgetool JSON |
Version |
0.0.66
JSON |
| download |
home_page | None |
Summary | This is an tool box contains tools for mgedata.Some of code are non-originality, just copy for use. All the referenced code are marked,details can be shown in their sources |
upload_time | 2024-11-08 09:31:23 |
maintainer | wangchangxin |
docs_url | None |
author | wangchangxin |
requires_python | >=3.6 |
license | None |
keywords |
exports
imports
show
tool
newclass
packbox
draft
path
|
VCS |
|
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
# MGE tool
Some useful base tools for other mge packages, but without specific task.
[![Python Versions](https://img.shields.io/pypi/pyversions/mgetool.svg)](https://pypi.org/project/mgetool/)
[![Version](https://img.shields.io/github/tag/MGEdata/mgetool.svg)](https://github.com/MGEdata/mgetool/releases/latest)
![pypi Versions](https://badge.fury.io/py/mgetool.svg)
# Install
```bash
pip install mgetool
```
# Contains
export
----------------------
**Store**
Store files in batches.(无差别存储数据)
import
----------------------
**Call**
Import files in batches.(无差别导入数据)
show
----------------------
**BasePlot**
Draw picture quickly.(快速画图)
**corr_plot**
Draw correlation coefficient graph.(相关系数图)
tool
----------------------
**tt**
```python
from mgetool.tool import tt
tt.t
...
tt.t
tt.p
```
Record the time of this site, and print uniformly.(测试代码块时间)
**time_this_function**
Time the function(测试函数运行时间,@)
**parallelize**
Parallelize the **for** loop (并行化)
**logg**
Get the name of function(输出函数信息,@)
newclass
----------------------
```python
from mgetool.newclass import create
import numpy as np
def ff(x, y):
print(y * 1000)
return x
Foo = create("Foo", np.ndarray, lenn=dict, spam=1, fu=ff)
foo = Foo([1, 2, 3])
a = foo.fu(2, 4)
```
Build a simple class quickly.(No initialization parameters)(快速创建新类)
packbox
----------------------
```python
from mgetool.packbox import Toolbox
def func(a, b=1, c=2, name=4, **kwargs):
print(a, b, c, name, kwargs)
pass
to = Toolbox()
to.register("a", func, 1, 5, abss=3)
to.refresh("a", 3, 4, 6, name=3, abss=4)
to.a()
```
Build a toolbox and you can add function to it.(函数集合)
draft
----------------------
```python
from mgetool.draft import DraftPyx
bd = DraftPyx("hello.pyx")
bd.write()
a= bd.quick_import(build=True, with_html=True)
# bd.remove()
```
Build for .cpp or .pyx temporary .(编译cython和cpp ,自动创建setup.py)
Raw data
{
"_id": null,
"home_page": null,
"name": "mgetool",
"maintainer": "wangchangxin",
"docs_url": null,
"requires_python": ">=3.6",
"maintainer_email": null,
"keywords": "exports, imports, show, tool, newclass, packbox, draft, path",
"author": "wangchangxin",
"author_email": "986798607@qq.com",
"download_url": "https://files.pythonhosted.org/packages/bd/32/a3027ce01c1efcdcdcf24129651eaf27b26bf0e26582e576643c8a61beae/mgetool-0.0.66.tar.gz",
"platform": "Windows",
"description": "# MGE tool\r\n\r\nSome useful base tools for other mge packages, but without specific task.\r\n\r\n[![Python Versions](https://img.shields.io/pypi/pyversions/mgetool.svg)](https://pypi.org/project/mgetool/)\r\n[![Version](https://img.shields.io/github/tag/MGEdata/mgetool.svg)](https://github.com/MGEdata/mgetool/releases/latest)\r\n![pypi Versions](https://badge.fury.io/py/mgetool.svg)\r\n\r\n# Install\r\n\r\n```bash\r\npip install mgetool\r\n```\r\n\r\n# Contains\r\n\r\nexport\r\n----------------------\r\n**Store**\r\n\r\nStore files in batches.(\u65e0\u5dee\u522b\u5b58\u50a8\u6570\u636e)\r\n\r\nimport\r\n----------------------\r\n**Call**\r\n\r\nImport files in batches.(\u65e0\u5dee\u522b\u5bfc\u5165\u6570\u636e)\r\n\r\nshow\r\n----------------------\r\n**BasePlot**\r\n\r\nDraw picture quickly.(\u5feb\u901f\u753b\u56fe)\r\n\r\n**corr_plot**\r\n\r\nDraw correlation coefficient graph.(\u76f8\u5173\u7cfb\u6570\u56fe)\r\n\r\ntool\r\n----------------------\r\n**tt**\r\n\r\n```python\r\nfrom mgetool.tool import tt\r\ntt.t\r\n...\r\ntt.t\r\ntt.p\r\n```\r\n\r\nRecord the time of this site, and print uniformly.(\u6d4b\u8bd5\u4ee3\u7801\u5757\u65f6\u95f4)\r\n\r\n**time_this_function**\r\n\r\nTime the function(\u6d4b\u8bd5\u51fd\u6570\u8fd0\u884c\u65f6\u95f4\uff0c@)\r\n\r\n**parallelize**\r\n\r\nParallelize the **for** loop (\u5e76\u884c\u5316)\r\n\r\n**logg**\r\n\r\nGet the name of function(\u8f93\u51fa\u51fd\u6570\u4fe1\u606f\uff0c@)\r\n\r\nnewclass\r\n----------------------\r\n\r\n```python\r\nfrom mgetool.newclass import create\r\n\r\nimport numpy as np\r\ndef ff(x, y):\r\n print(y * 1000)\r\n return x\r\n\r\nFoo = create(\"Foo\", np.ndarray, lenn=dict, spam=1, fu=ff)\r\nfoo = Foo([1, 2, 3])\r\na = foo.fu(2, 4)\r\n```\r\n\r\nBuild a simple class quickly.(No initialization parameters)\uff08\u5feb\u901f\u521b\u5efa\u65b0\u7c7b\uff09\r\n\r\npackbox\r\n----------------------\r\n\r\n```python\r\nfrom mgetool.packbox import Toolbox\r\n\r\ndef func(a, b=1, c=2, name=4, **kwargs):\r\n print(a, b, c, name, kwargs)\r\n pass\r\n\r\n\r\nto = Toolbox()\r\n\r\nto.register(\"a\", func, 1, 5, abss=3)\r\nto.refresh(\"a\", 3, 4, 6, name=3, abss=4)\r\nto.a()\r\n```\r\n\r\nBuild a toolbox and you can add function to it.(\u51fd\u6570\u96c6\u5408)\r\n\r\ndraft\r\n----------------------\r\n\r\n```python\r\nfrom mgetool.draft import DraftPyx\r\n\r\nbd = DraftPyx(\"hello.pyx\")\r\nbd.write()\r\na= bd.quick_import(build=True, with_html=True)\r\n# bd.remove()\r\n```\r\n\r\nBuild for .cpp or .pyx temporary .(\u7f16\u8bd1cython\u548ccpp \uff0c\u81ea\u52a8\u521b\u5efasetup.py)\r\n\r\n",
"bugtrack_url": null,
"license": null,
"summary": "This is an tool box contains tools for mgedata.Some of code are non-originality, just copy for use. All the referenced code are marked,details can be shown in their sources",
"version": "0.0.66",
"project_urls": null,
"split_keywords": [
"exports",
" imports",
" show",
" tool",
" newclass",
" packbox",
" draft",
" path"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "bd32a3027ce01c1efcdcdcf24129651eaf27b26bf0e26582e576643c8a61beae",
"md5": "5f3078dc2e1827f6982d0c1f0e0362a0",
"sha256": "e76a05ddb4bcc78cf3cb07199aca30584383d77c6cbfdfa4822c4dc86570a400"
},
"downloads": -1,
"filename": "mgetool-0.0.66.tar.gz",
"has_sig": false,
"md5_digest": "5f3078dc2e1827f6982d0c1f0e0362a0",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.6",
"size": 57293,
"upload_time": "2024-11-08T09:31:23",
"upload_time_iso_8601": "2024-11-08T09:31:23.779013Z",
"url": "https://files.pythonhosted.org/packages/bd/32/a3027ce01c1efcdcdcf24129651eaf27b26bf0e26582e576643c8a61beae/mgetool-0.0.66.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-11-08 09:31:23",
"github": false,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"lcname": "mgetool"
}