Enter the following snippet into your chrome developer console
copy($x('.//span[@class="highlight"]').map(x => x.innerText).join("\n"))
ssh -i path/to/pem <ec2-instance-username>@`aws ec2 describe-instances --instance-ids <ec2-instance-id> --query 'Reservations[*].Instances[*].PublicIpAddress' --output=text` |
for i in {8000..8899}; do fuser -n tcp -k $i; done |
def split_train_test(categories, PATH, percent_test=0.2): | |
for category in categories: | |
print(len(os.listdir(PATH+category))) | |
files = os.listdir(PATH+category) | |
for file in files: | |
if np.random.rand(1) < percent_test: | |
shutil.copyfile(PATH + category +"/" + file, PATH + "test/" +category +"/" + file) | |
else: | |
shutil.copyfile(PATH + category +"/" + file, PATH + "train/"+ category +"/" + file) |