{
"info": {
"author": "Nikita Kuzin",
"author_email": "getsense@yandex.ru",
"bugtrack_url": null,
"classifiers": [],
"description": "# useful python things
\n
\nadd class
\n
\nclass _type_sign(Enum):
\n SIGN=1
\n UNSIGN=2
\n
\nenv
\n
\nfrom pyeco import *
\nfrom pyeco import _type_sign
\n
\n
\n
\nfunction: dec2hex(_dec,_nbits)
\n
\n_dec -> input decimal:
\n8 bits[-128,127],
\n16 bits[-32768,32767],
\n32 bits[-2147483648,2147483647]
\n_nbits -> _dec's number bits: 8,16,32
\noutput -> dec to hex format
\n
\nexample:
\nprint(dec2hex(-127,8))
\n
\n
\nfunction: hex2dec(_hex,_nbits,_s)
\n_hex -> input hex:
\n_nbits -> _dec's number bits: 8,16,32
\n_s -> _type_sign.UNSIGN/_type_sign.SIGN output decimal
\noutput -> hex to decimal format
\n
\n example:
\n print(hex2dec(0x81010181,32,_type_sign.UNSIGN))
\n
\n
\nfunction: dec2bin(_dec,_nbits)
\n_dec -> input decimal
\n_nbits -> _dec's number bits: 8,16,32
\noutput -> dec to binary format
\n
\nexample:
\nprint(dec2bin(-128,16))
\n
\n
\nfunction: bin2dec(_bin,_nbits,_s)
\n_bin -> input binary:
\n_nbits -> _dec's number bits: 8,16,32
\n_s -> _type_sign.UNSIGN/_type_sign.SIGN output decimal
\noutput -> bin to decimal format
\n
\nexample:
\nprint(bin2dec(\"11111111111111111111111110000000\",32,_type_sign.UNSIGN))
\n
\n
\nfunction: hex2bin(_hex,_nbits)
\n_hex -> input hex:
\n_nbits -> _dec's number bits: 8,16,32
\noutput -> hex to binary format
\n
\nexample:
\nprint(hex2bin(0x81010181,32))
\n
\nfunction: bin2hex(_bin,_nbits)
\n_bin -> input hex:
\n_nbits -> _dec's number bits: 8,16,32
\noutput -> binary to hex format
\n
\nexample:
\nprint(bin2hex(\"1100000000000011\",16))
\n
\nenv
\n
\nfrom pyeco import *
\nfrom pyeco import _adr_size
\n
\nbindiff(_file1,_file2,_nbits,_size,_flag,_base_adr)
\n_file1 - first file,
\n_file2 - second file,
\n_nbits - word's number bits: 8,16,32,
\n_size - how much words to compare
\n_flag - screen adress by _nbits words or bytes
\n_base_adr - base adress, need for real dats location
\noutput -> binary difference between _file1 and _file2
\n
\nexample:
\nbindiff(\"e:/spil.bin\",\"e:/u-boot.bin\",32,int(0xce0/4),_adr_size.BYTE,0xe6300000)
\nenv
\n
\nfrom pyeco import *
\n
\nfunction: max_array(in_array)
\nin_array - \u0432\u0445\u043e\u0434\u043d\u043e\u0439 \u043c\u0430\u0441\u0441\u0438\u0432
\noutput -> \u0432\u044b\u0447\u0438\u0441\u043b\u044f\u0435\u0442 MAX \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0447\u0438\u0441\u043b\u0430 \u0438\u0437 \u043c\u0430\u0441\u0441\u0438\u0432\u0430 in_array \u0438 \u0432\u044b\u0432\u043e\u0434\u0438\u0442 \u043d\u0430 \u043a\u043e\u043d\u0441\u043e\u043b\u044c
\n
\nexample:
\nimport numpy as np
\n\nin_array = np.array([-176,3,148,-10,36,238,-76])
\n\nmax_array(in_array)
\n
\n\n",
"description_content_type": "text/markdown",
"docs_url": null,
"download_url": "",
"downloads": {
"last_day": -1,
"last_month": -1,
"last_week": -1
},
"home_page": "",
"keywords": "",
"license": "",
"maintainer": "",
"maintainer_email": "",
"name": "pyeco",
"package_url": "https://pypi.org/project/pyeco/",
"platform": "",
"project_url": "https://pypi.org/project/pyeco/",
"project_urls": null,
"release_url": "https://pypi.org/project/pyeco/0.5/",
"requires_dist": null,
"requires_python": "",
"summary": "useful python things",
"version": "0.5"
},
"last_serial": 4962235,
"releases": {
"0.5": [
{
"comment_text": "",
"digests": {
"md5": "1545fe2393d1fe79816a820bc2b5aea2",
"sha256": "762d1197b2db77ef2f3ca126dd4f8c95968d4da5ec687dfd7b4a13bd6d1f0764"
},
"downloads": -1,
"filename": "pyeco-0.5-py3-none-any.whl",
"has_sig": false,
"md5_digest": "1545fe2393d1fe79816a820bc2b5aea2",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": null,
"size": 4315,
"upload_time": "2019-03-20T06:27:52",
"url": "https://files.pythonhosted.org/packages/db/07/86202c32a6f40e75fe3fb6452cd0f586646555c4acb467a3642650a6f8ce/pyeco-0.5-py3-none-any.whl"
},
{
"comment_text": "",
"digests": {
"md5": "abe45489fa07c060b48d35dd87cc643c",
"sha256": "c4860879ef5949ad2112b3cd1f69a5f65a7c2314ef6c570c76e0e5156a325c66"
},
"downloads": -1,
"filename": "pyeco-0.5.tar.gz",
"has_sig": false,
"md5_digest": "abe45489fa07c060b48d35dd87cc643c",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 3301,
"upload_time": "2019-03-20T06:27:54",
"url": "https://files.pythonhosted.org/packages/9e/c6/8a9a2b6e3052137b870630e5de32a37f946af55e87991d05782263a3a7e3/pyeco-0.5.tar.gz"
}
]
},
"urls": [
{
"comment_text": "",
"digests": {
"md5": "1545fe2393d1fe79816a820bc2b5aea2",
"sha256": "762d1197b2db77ef2f3ca126dd4f8c95968d4da5ec687dfd7b4a13bd6d1f0764"
},
"downloads": -1,
"filename": "pyeco-0.5-py3-none-any.whl",
"has_sig": false,
"md5_digest": "1545fe2393d1fe79816a820bc2b5aea2",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": null,
"size": 4315,
"upload_time": "2019-03-20T06:27:52",
"url": "https://files.pythonhosted.org/packages/db/07/86202c32a6f40e75fe3fb6452cd0f586646555c4acb467a3642650a6f8ce/pyeco-0.5-py3-none-any.whl"
},
{
"comment_text": "",
"digests": {
"md5": "abe45489fa07c060b48d35dd87cc643c",
"sha256": "c4860879ef5949ad2112b3cd1f69a5f65a7c2314ef6c570c76e0e5156a325c66"
},
"downloads": -1,
"filename": "pyeco-0.5.tar.gz",
"has_sig": false,
"md5_digest": "abe45489fa07c060b48d35dd87cc643c",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 3301,
"upload_time": "2019-03-20T06:27:54",
"url": "https://files.pythonhosted.org/packages/9e/c6/8a9a2b6e3052137b870630e5de32a37f946af55e87991d05782263a3a7e3/pyeco-0.5.tar.gz"
}
]
}