update usage example in README.md

Added SampleGenerator class in documentation for better illustration of
this utility.
update usage example in README.MD

Added SampleGenerator code snippet in documentation.