Shuffling is a pretty interesting operation in several scenarios. And different languages / platforms have interesting features using the shuffling operation.
- Shuffle the contents of a C# List
- Select random lines from file (using ‘shuf’ command in Linux)
- shuf command:
- shuf -n 500000 ydata-fp-td-clicks-v1_0.20090501 -o 20090501/sample_500K
- split command
- pandas has a ‘sample’ function that can be very useful to randomly sample rows from a pandas dataframe.