igenerator


Nameigenerator JSON
Version 0.0.2 PyPI version JSON
download
home_page
SummaryGenerating random numbers faster than numpy
upload_time2023-01-21 15:12:56
maintainer
docs_urlNone
authorMahimai Raja J ( iKurious )
requires_python
license
keywords python random generator numbers machine learning database data generator
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            
# igenerator

**igenerator** is a python package that allows you to generate psudo random numbers and write them to a CSV file or SQLite database with just a few lines of code. The package utilizes the [JAX](https://jax.readthedocs.io/en/latest/#) function which is based on the C++ library [random123](http://www.thesalmons.org/john/random123/). These functions are designed to be fast and efficient, and are suitable for use in machine learning applications.

## Installation
You can install the package using pip:

``` bash
pip install igenerator
```

## Usage
To use the package, you first need to import it:

``` python
from igenerator import LiveGenerator
```

Then, you can create an instance of the `TrueGenerator` class:

```python
generator = LiveGenerator()
or
generator = LiveGenerator(0) # Pass a optional parameter (i.e any integer ) to set the seed val.

```

You can use the `randomInt()` method to generate a list of random integers within a certain range:
``` python
result = generator.randomInt(2, 15, 4)
``` 

The above code will generate a list of 4 random integers between 2 and 15 (inclusive).

You can then use the `writeCsv()` method to write the list of random numbers to a CSV file:

``` python
generator.writeCsv(result, 'your_csv_name.csv')
```

### Note
Before writing into a csv file remember to create one with desired headers.



And use the `writeSql()` method to write the list of random numbers to a SQLite database:

```python
table_name = "your_table_name"
generator.writeSql(result,'your_database_name.db',table_name)
```

### Note
Before writing into a sqlite database remember to create a table with desired headers.

## Example :

``` python
from igenerator.generate import LiveGenerator

generator = LiveGenerator()
result = generator.randomInt(2,15,4) # For float values use randomFloat

generator.writeCsv(result,'your_csv_name.csv')

table_name = "your_table_name"
generator.writeSql(result,'your_database_name.db',table_name)

```

## License
This package is released under the [MIT License](https://opensource.org/licenses/MIT).

            

Raw data

            {
    "_id": null,
    "home_page": "",
    "name": "igenerator",
    "maintainer": "",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "",
    "keywords": "python,random generator,numbers,machine learning,database,data generator",
    "author": "Mahimai Raja J ( iKurious )",
    "author_email": "<info@mahimairaja.in>",
    "download_url": "https://files.pythonhosted.org/packages/86/ec/14e8801fa70001eecab5f4125db45116a778a7f41e43faabb2e90e7a4199/igenerator-0.0.2.tar.gz",
    "platform": null,
    "description": "\n# igenerator\n\n**igenerator** is a python package that allows you to generate psudo random numbers and write them to a CSV file or SQLite database with just a few lines of code. The package utilizes the [JAX](https://jax.readthedocs.io/en/latest/#) function which is based on the C++ library [random123](http://www.thesalmons.org/john/random123/). These functions are designed to be fast and efficient, and are suitable for use in machine learning applications.\n\n## Installation\nYou can install the package using pip:\n\n``` bash\npip install igenerator\n```\n\n## Usage\nTo use the package, you first need to import it:\n\n``` python\nfrom igenerator import LiveGenerator\n```\n\nThen, you can create an instance of the `TrueGenerator` class:\n\n```python\ngenerator = LiveGenerator()\nor\ngenerator = LiveGenerator(0) # Pass a optional parameter (i.e any integer ) to set the seed val.\n\n```\n\nYou can use the `randomInt()` method to generate a list of random integers within a certain range:\n``` python\nresult = generator.randomInt(2, 15, 4)\n``` \n\nThe above code will generate a list of 4 random integers between 2 and 15 (inclusive).\n\nYou can then use the `writeCsv()` method to write the list of random numbers to a CSV file:\n\n``` python\ngenerator.writeCsv(result, 'your_csv_name.csv')\n```\n\n### Note\nBefore writing into a csv file remember to create one with desired headers.\n\n\n\nAnd use the `writeSql()` method to write the list of random numbers to a SQLite database:\n\n```python\ntable_name = \"your_table_name\"\ngenerator.writeSql(result,'your_database_name.db',table_name)\n```\n\n### Note\nBefore writing into a sqlite database remember to create a table with desired headers.\n\n## Example :\n\n``` python\nfrom igenerator.generate import LiveGenerator\n\ngenerator = LiveGenerator()\nresult = generator.randomInt(2,15,4) # For float values use randomFloat\n\ngenerator.writeCsv(result,'your_csv_name.csv')\n\ntable_name = \"your_table_name\"\ngenerator.writeSql(result,'your_database_name.db',table_name)\n\n```\n\n## License\nThis package is released under the [MIT License](https://opensource.org/licenses/MIT).\n",
    "bugtrack_url": null,
    "license": "",
    "summary": "Generating random numbers faster than numpy",
    "version": "0.0.2",
    "split_keywords": [
        "python",
        "random generator",
        "numbers",
        "machine learning",
        "database",
        "data generator"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "04a71d3781e85dfcd2f88e7a9b7d8c872e46884345aa5eff1dcf9d706ac1c179",
                "md5": "70b3ef52b1f44e78f0d655ba079ef097",
                "sha256": "d0bb19ca9b87544f48421d41bb58222ea5345cb7ab040974740da5765baa0b47"
            },
            "downloads": -1,
            "filename": "igenerator-0.0.2-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "70b3ef52b1f44e78f0d655ba079ef097",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 3905,
            "upload_time": "2023-01-21T15:12:54",
            "upload_time_iso_8601": "2023-01-21T15:12:54.417450Z",
            "url": "https://files.pythonhosted.org/packages/04/a7/1d3781e85dfcd2f88e7a9b7d8c872e46884345aa5eff1dcf9d706ac1c179/igenerator-0.0.2-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "86ec14e8801fa70001eecab5f4125db45116a778a7f41e43faabb2e90e7a4199",
                "md5": "867bca819ff9ac954da58031e3426e74",
                "sha256": "2d9fc4ec147e9ea630a332e3629576a239e039de509393229b01a280b4355b29"
            },
            "downloads": -1,
            "filename": "igenerator-0.0.2.tar.gz",
            "has_sig": false,
            "md5_digest": "867bca819ff9ac954da58031e3426e74",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 3734,
            "upload_time": "2023-01-21T15:12:56",
            "upload_time_iso_8601": "2023-01-21T15:12:56.259467Z",
            "url": "https://files.pythonhosted.org/packages/86/ec/14e8801fa70001eecab5f4125db45116a778a7f41e43faabb2e90e7a4199/igenerator-0.0.2.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-01-21 15:12:56",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "lcname": "igenerator"
}
        
Elapsed time: 0.03019s