Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/omarhimada/flogen
FloGen is a small program that uses cartesian products, Fisher-Yates and System.Random to generate large amounts of randomized eCommerce order & customer data, for testing things like ML applications.
https://github.com/omarhimada/flogen
Last synced: about 1 month ago
JSON representation
FloGen is a small program that uses cartesian products, Fisher-Yates and System.Random to generate large amounts of randomized eCommerce order & customer data, for testing things like ML applications.
- Host: GitHub
- URL: https://github.com/omarhimada/flogen
- Owner: omarhimada
- License: apache-2.0
- Created: 2020-03-06T14:19:01.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2022-12-08T09:52:27.000Z (about 2 years ago)
- Last Synced: 2023-03-06T09:20:40.073Z (almost 2 years ago)
- Language: C#
- Homepage:
- Size: 1.62 MB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# FloGen
FloGen generates randomized order and customer data for testing ML applications. For example, if you want to generate millions of dummy records to test your machine learning implementations, you can use FloGen to generate a configurable amount of random data to consume.Number of unique customer IDs, SKUs, the quantity of cart items in an order, and the quantity of each SKU in those cart items are all randomized. The customer records associated to them will also be random.
The parameters can be configured and the output is serialized to a local CSV or JSON file.
#### Example input:
- **Number of random orders to generate**
- OrdersToGenerate = 50000
- **Generate random SKUs using these characters**
- CharactersToUse = { '0', '1', '2', '3', '4', '5', '6', '7', '8', '9' }
- **Maximum number of unique customer IDs to spread across all generated orders**
- MaximumNumberOfCustomers = 8000
- **Maximum length of the SKU to use when generating cart orders**
- MaximumLengthOfSku = 4- **Maximum quantity for each SKU in the generated cart orders**
- MaximumSkuQuantity = 6- **Maximum quantity of cart items in the generated cart orders**
- MaximumCartItemQuantity = 4
- **Number of variable quantities for each SKU across all orders**
- MaximumSkuQuantityVariance = 6
- *Each SKU will have, at most, this number of unique quantities across every cart item it's present in*- **The characters to choose from when generating random email prefixes**
- AvailableCharsForRandomEmailPrefixes = "abcdefghijklmnopqrstuvwxyz0123456789";- **The strings to choose from when generating random email suffixes**
- AvailableStringsForRandomEmailSuffixes = ["@yahoo.ru", "@hotmail.co.uk", "@gmail.com", "@monarchy.gov"]#### Output:
50,000 orders across 8,000 unique customers*RandomOrders-2020-03-19-13-51-16.csv* (2.9 MB)
![RandomOrders CSV](https://floyalty-ca.s3.ca-central-1.amazonaws.com/random-orders.png)*RandomCustomers-2020-03-19-13-51-16.csv* (1.2 MB)
![RandomCustomers CSV](https://floyalty-ca.s3.ca-central-1.amazonaws.com/random-customers.png)*Example JSON output:*
Generation time: ~72 milliseconds (0.072s)
````JSON
{
"orders": [
{
"customerId": 2268,
"cart": [
{
"sku": "72",
"quantity": 1
},
{
"sku": "70",
"quantity": 4
}
],
"orderDate": "2011-06-27T00:00:00"
},
{
"customerId": 956,
"cart": [
{
"sku": "96",
"quantity": 3
},
{
"sku": "6",
"quantity": 4
}
],
"orderDate": "2019-07-27T00:00:00"
},
{
"customerId": 7777,
"cart": [
{
"sku": "66",
"quantity": 2
}
],
"orderDate": "2009-10-02T00:00:00"
},
{ "..." }
]
}
````