This file contains hidden or 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
| """Project quota runout trajectory from slash-status style text. | |
| Quick launcher install (so you can run `quota-trajectory ...`): | |
| # Run these commands from the directory containing quota_trajectory.py. | |
| SCRIPT_PATH="$(realpath ./quota_trajectory.py)" | |
| cat > ~/bin/quota-trajectory <<'BASH' | |
| #!/usr/bin/env bash | |
| exec python3 "__QUOTA_TRAJECTORY_PATH__" "$@" | |
| BASH |
This file contains hidden or 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 subprocess | |
| import time | |
| from concurrent.futures import ThreadPoolExecutor, as_completed | |
| from pathlib import Path | |
| from typing import Callable, Sequence | |
| PROGRESS_BAR_WIDTH = 28 | |
| __all__ = ["parallel_rsync_copy"] |
This file contains hidden or 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
| def restart_from_checkpoint(checkpoint_path, restore_objects=None, **kwargs): | |
| """ | |
| Re-start training or inference from a previous checkpoint. | |
| Args: | |
| checkpoint_path (str): Path to checkpoint file | |
| restore_objects (dict): Dict containing objects to reload from checkpoint | |
| **kwargs (dict): Keyword args containing model states to reload | |
| Returns: |
This file contains hidden or 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
| from scipy.stats import norm | |
| def detectable_difference(alpha, power, proportion, n_positives): | |
| """ | |
| Calculate the detectable difference in proportions for a given sample size, power, significance level, and proportion. | |
| Parameters: | |
| alpha: Significance level | |
| power: Desired power of the test |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or 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
| LOCK_NAME="chimec_sync" | |
| LOCK_DIR='/tmp/'${LOCK_NAME}.lock | |
| PID_FILE=${LOCK_DIR}'/'${LOCK_NAME}'.pid' | |
| if mkdir ${LOCK_DIR} 2>/dev/null; then | |
| # If the ${LOCK_DIR} doesn't exist, then start working & store the ${PID_FILE} | |
| echo $$ > ${PID_FILE} | |
| rsync --remove-source-files -avPz /mnt/hiro/ t.cri.awoodard@gardner.cri.uchicago.edu:/gpfs/data/huo-lab/Image/ChiMEC/ >& /home/annawoodard/rsync.log | |
| rm -rf ${LOCK_DIR} |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
NewerOlder