eisenmp-examples


Nameeisenmp-examples JSON
Version 0.4.1 PyPI version JSON
download
home_page
Summaryeisenmp multiprocess(or) example collection for server and mobiles
upload_time2023-04-14 09:13:40
maintainer
docs_urlNone
authorRené Horn
requires_python>=3.7
licenseBSD-3-Clause
keywords multiprocess framework examples eisenmp
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # eisenmp_examples
 
Python 3.7 [Multiprocess](https://en.wikipedia.org/wiki/Multiprocessing) 
[Framework](https://en.wikipedia.org/wiki/Software_framework) for Server and Mobiles 

Examples:

* simple style prime number calculation to see the basic use
* simple http server on one cpu gets content via queue
* one flask orm server on each cpu - share a user db
* multiple flask orm server on each cpu, port groups - share a user db
* web download csv large list, calculate average over a column
* brute_force_attack with itertools generator and dictionary
* example with two, double fed queues
* All scenarios follow the **Template style** and have descriptions

## How to run the examples?

1. Clone the repo and ``run an eisenmp_exa_...`` or
2. Install [PyPi package](https://pypi.org/project/eisenmp-examples/)
* in terminal run: `eisenmp_url` and open the local Python SimpleHTTP **URL**
* in terminal run: `eisenmp_menu` and choose from **Menu**

Brute force cracks strings of an online-game alphabet salad quest. 

    .. read wordlist .\lang_dictionaries\ger\german.dic
    .. read wordlist .\lang_dictionaries\eng\words.txt

	[BRUTE_FORCE]	cfhhilorrs

    Create processes. Default: proc/CPU core
    0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 
    
    ... proc Process-7 ... rohrschilf
    ... proc Process-14 ... rohrschilf
    ... proc Process-16 ... rohrschilf
    ... proc Process-7 ... rohrschilf
    ... proc Process-13 ... schilfrohr
    ... proc Process-13 ... schilfrohr
    ... proc Process-11 ... schilfrohr
    ... proc Process-11 ... schilfrohr

	generator empty, run time iterator 5 seconds

	exit WORKER 15
	exit WORKER 16
	exit WORKER 2
	exit WORKER 10
	exit WORKER 11
	exit WORKER 12
	exit WORKER 8
	exit WORKER 3
	exit WORKER 4
	exit WORKER 6
	exit WORKER 14
	exit WORKER 5
	exit WORKER 7
	exit WORKER 13
	exit WORKER 1
	exit WORKER 9

    --- Result for [CFHHILORRS]---
    
     rohrschilf
    
     schilfrohr

    --- END ---

	Processes are down.
    BF Time in sec: 12
    
    Process finished with exit code 0

    Inbuild example, assert a scrambled string. Use brute force or condensing.
    We use an english (.6M) plus a german (2M) wordlist and make a dictionary of it. To gain more read speed.
    (A) len(str) <=  11, combined brute force dictionary attack with a permutation generator. itertool prod. duplicates
        Permutation lists grow very fast, reaching Terabyte size.
    (B) len(str) >=  12, pre reduce a len(str) list. Kick out words which are not matching char type and count.

`eisenmp` uses Pythons permutation generator
 [itertools](https://docs.python.org/3/library/itertools.html?highlight=itertools.permutations#itertools.permutations)
for the brute force attack example.

    Another example downloads a large list and calculates average for one column.
    Python CSV extracts the column and we calculate the average with the assigned number
    of Porcesses/CPU cores. It can be more processes than CPU cores, if it makes sense.


- large lists https://www.stats.govt.nz/large-datasets/csv-files-for-download/ Crown copyright ©. 
All material Stats NZ produces is protected by Crown copyright.
Creative Commons Attribution 4.0 International licence.
- German dict https://sourceforge.net/projects/germandict/. License Public Domain
- English dict Copyright (c) J Ross Beresford 1993-1999. All Rights Reserved.
- ORM Flask-SQLAlchemy https://pypi.org/project/Flask-SQLAlchemy-Project-Template/ License MIT 44xtc44

Cheers

            

Raw data

            {
    "_id": null,
    "home_page": "",
    "name": "eisenmp-examples",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.7",
    "maintainer_email": "",
    "keywords": "multiprocess framework,examples eisenmp",
    "author": "Ren\u00e9 Horn",
    "author_email": "Ren\u00e9 Horn <rene_horn@gmx.net>",
    "download_url": "https://files.pythonhosted.org/packages/06/bc/9e4d3fcf16760336d34528b4e15f7cb12832eaf18b6cd1ef4564e405b66d/eisenmp_examples-0.4.1.tar.gz",
    "platform": null,
    "description": "# eisenmp_examples\r\n \r\nPython 3.7 [Multiprocess](https://en.wikipedia.org/wiki/Multiprocessing) \r\n[Framework](https://en.wikipedia.org/wiki/Software_framework) for Server and Mobiles \r\n\r\nExamples:\r\n\r\n* simple style prime number calculation to see the basic use\r\n* simple http server on one cpu gets content via queue\r\n* one flask orm server on each cpu - share a user db\r\n* multiple flask orm server on each cpu, port groups - share a user db\r\n* web download csv large list, calculate average over a column\r\n* brute_force_attack with itertools generator and dictionary\r\n* example with two, double fed queues\r\n* All scenarios follow the **Template style** and have descriptions\r\n\r\n## How to run the examples?\r\n\r\n1. Clone the repo and ``run an eisenmp_exa_...`` or\r\n2. Install [PyPi package](https://pypi.org/project/eisenmp-examples/)\r\n* in terminal run: `eisenmp_url` and open the local Python SimpleHTTP **URL**\r\n* in terminal run: `eisenmp_menu` and choose from **Menu**\r\n\r\nBrute force cracks strings of an online-game alphabet salad quest. \r\n\r\n    .. read wordlist .\\lang_dictionaries\\ger\\german.dic\r\n    .. read wordlist .\\lang_dictionaries\\eng\\words.txt\r\n\r\n\t[BRUTE_FORCE]\tcfhhilorrs\r\n\r\n    Create processes. Default: proc/CPU core\r\n    0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 \r\n    \r\n    ... proc Process-7 ... rohrschilf\r\n    ... proc Process-14 ... rohrschilf\r\n    ... proc Process-16 ... rohrschilf\r\n    ... proc Process-7 ... rohrschilf\r\n    ... proc Process-13 ... schilfrohr\r\n    ... proc Process-13 ... schilfrohr\r\n    ... proc Process-11 ... schilfrohr\r\n    ... proc Process-11 ... schilfrohr\r\n\r\n\tgenerator empty, run time iterator 5 seconds\r\n\r\n\texit WORKER 15\r\n\texit WORKER 16\r\n\texit WORKER 2\r\n\texit WORKER 10\r\n\texit WORKER 11\r\n\texit WORKER 12\r\n\texit WORKER 8\r\n\texit WORKER 3\r\n\texit WORKER 4\r\n\texit WORKER 6\r\n\texit WORKER 14\r\n\texit WORKER 5\r\n\texit WORKER 7\r\n\texit WORKER 13\r\n\texit WORKER 1\r\n\texit WORKER 9\r\n\r\n    --- Result for [CFHHILORRS]---\r\n    \r\n     rohrschilf\r\n    \r\n     schilfrohr\r\n\r\n    --- END ---\r\n\r\n\tProcesses are down.\r\n    BF Time in sec: 12\r\n    \r\n    Process finished with exit code 0\r\n\r\n    Inbuild example, assert a scrambled string. Use brute force or condensing.\r\n    We use an english (.6M) plus a german (2M) wordlist and make a dictionary of it. To gain more read speed.\r\n    (A) len(str) <=  11, combined brute force dictionary attack with a permutation generator. itertool prod. duplicates\r\n        Permutation lists grow very fast, reaching Terabyte size.\r\n    (B) len(str) >=  12, pre reduce a len(str) list. Kick out words which are not matching char type and count.\r\n\r\n`eisenmp` uses Pythons permutation generator\r\n [itertools](https://docs.python.org/3/library/itertools.html?highlight=itertools.permutations#itertools.permutations)\r\nfor the brute force attack example.\r\n\r\n    Another example downloads a large list and calculates average for one column.\r\n    Python CSV extracts the column and we calculate the average with the assigned number\r\n    of Porcesses/CPU cores. It can be more processes than CPU cores, if it makes sense.\r\n\r\n\r\n- large lists https://www.stats.govt.nz/large-datasets/csv-files-for-download/ Crown copyright \u00a9. \r\nAll material Stats NZ produces is protected by Crown copyright.\r\nCreative Commons Attribution 4.0 International licence.\r\n- German dict https://sourceforge.net/projects/germandict/. License Public Domain\r\n- English dict Copyright (c) J Ross Beresford 1993-1999. All Rights Reserved.\r\n- ORM Flask-SQLAlchemy https://pypi.org/project/Flask-SQLAlchemy-Project-Template/ License MIT 44xtc44\r\n\r\nCheers\r\n",
    "bugtrack_url": null,
    "license": "BSD-3-Clause",
    "summary": "eisenmp multiprocess(or) example collection for server and mobiles",
    "version": "0.4.1",
    "split_keywords": [
        "multiprocess framework",
        "examples eisenmp"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "f9b1bf4e7cdd14cc48c30bd9c4013dec05dd940f9a5e066db71476172bacef7a",
                "md5": "44053b54217c06b8b68246edcacdebdc",
                "sha256": "0a47bbaa21ae523b20f6855b0bc9e2f6b1ca4b2c776827eae4acfb9fcb1cb2b7"
            },
            "downloads": -1,
            "filename": "eisenmp_examples-0.4.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "44053b54217c06b8b68246edcacdebdc",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.7",
            "size": 45321,
            "upload_time": "2023-04-14T09:13:38",
            "upload_time_iso_8601": "2023-04-14T09:13:38.171283Z",
            "url": "https://files.pythonhosted.org/packages/f9/b1/bf4e7cdd14cc48c30bd9c4013dec05dd940f9a5e066db71476172bacef7a/eisenmp_examples-0.4.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "06bc9e4d3fcf16760336d34528b4e15f7cb12832eaf18b6cd1ef4564e405b66d",
                "md5": "7475c36bc72d0628c763386909ca7197",
                "sha256": "942aa006c24d581dab379e7e78647ea66feb6fbee6ae96dfae853e51f8b5ae7d"
            },
            "downloads": -1,
            "filename": "eisenmp_examples-0.4.1.tar.gz",
            "has_sig": false,
            "md5_digest": "7475c36bc72d0628c763386909ca7197",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.7",
            "size": 30970,
            "upload_time": "2023-04-14T09:13:40",
            "upload_time_iso_8601": "2023-04-14T09:13:40.269358Z",
            "url": "https://files.pythonhosted.org/packages/06/bc/9e4d3fcf16760336d34528b4e15f7cb12832eaf18b6cd1ef4564e405b66d/eisenmp_examples-0.4.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-04-14 09:13:40",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "lcname": "eisenmp-examples"
}
        
Elapsed time: 0.14943s