Utilities - glozanoa/adas GitHub Wiki

In dgen (data generator) directory you can find useful python scripts to generate random data to test algorithms efficiency.

To learn more about what does a script do, run:

    python3 PATH2SCRIPT -h

Examples

  • Generate random integer numbers and save them in a file
  # Generating 100 random integer between 1 and 250 and save them in unsorted.txt
  # I SUPPOSE THAT YOU ARE IN THE BASE OF THIS REPOSITORY, OTHERWISE SIMPLY CHANGE THE PATHS.
  python3 dgen/intgen.py 1 250 100 unsorted.txt
  • Generate unique random integer numbers and save them in a file
  # Generating 100 unique (*without repetition*) random integer between 1 and 250 and save them in unsorted.txt
  # I SUPPOSE THAT YOU ARE IN THE BASE OF THIS REPOSITORY, OTHERWISE SIMPLY CHANGE THE PATHS.
  python3 dgen/intgen.py -u 1 250 100 unsorted.txt