This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import contextlib | |
import tempfile | |
import random | |
def two_pass_shuffle(input_files, output_files, temp_file_count, header_lines=0): | |
""" | |
two_pass_shuffle | |
Suffle data larger that can be shuffled in memory. | |
Implementation based on: |