Skip to content

Instantly share code, notes, and snippets.

@holysoros holysoros/
Created Mar 22, 2019

What would you like to do?
Split data file into train and valid part.
#!/usr/bin/env bash
shuf $1 >random.txt
linenum=`wc -l random.txt | awk '{print $1}'`
head -n $trainnum random.txt > notes.train
head -n $validnum random.txt > notes.valid
rm random.txt
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.