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
[wsl2] | |
memory=4GB # Limits VM memory in WSL 2 to 4 GB | |
processors=2 # Makes the WSL 2 VM use two virtual processors | |
localhostForwarding=true | |
swap=0GB |
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
struct CBCSolverResult | |
# job_result::Symbol | |
solver_status::String | |
solver_result | |
end | |
CBC_SOLVE_RESULT = CBCSolverResult("Failed", Nothing) | |
long_running_job(do_times) = |
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
""" | |
Optimize saving the stdout of a subprocess. | |
""" | |
import os | |
import subprocess | |
import sys | |
import io | |
def run_command(cmd, log_file_path, timeout=28800, timeout_rerun=3): |
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 os | |
import tarfile | |
import imageio | |
import tqdm | |
import numpy as np | |
def get_nomnist(): | |
classes = ["A", "B", "C", "D", "E", "F", "G", "H", "I", "J"] | |
tar_path = "./data/no-mnist/archive/notMNIST_large.tar" | |
tmp_path = "./data/no-mnist/archive/tmp" |