We assume that there are two users (A and B). A is gonna delete the bad files. B is gonna receive the changes.
At the start, we need A and B to have the SAME version history.
We'll assume there are no branches other than master.
import argparse | |
import pandas as pd | |
import os | |
import subprocess | |
import psutil | |
global GPU_UUID_MAP | |
GPU_UUID_MAP = dict() | |
def get_current_cpu_mem_usage(field='rss', process=None): |
sacct -j 56012984_1.batch --format=jobid,jobname,partition,maxvmsize,maxrss,state,elapsed,reqmem,reqcpus |
import numpy as np | |
import scipy.stats | |
from scipy.special import logsumexp, softmax | |
np.set_printoptions(precision=3, suppress=1) | |
## Settings | |
## -------- |
## Using notation from HDP-HMM paper in NeurIPS 2015 (Hughes, Stephenson, Sudderth) | |
## Start for a single sequence of interest, | |
## Compute the following as in the tutorial here: | |
https://bnpy.readthedocs.io/en/latest/examples/08_mocap6/plot-03-demo=interpret_hdphmm_params_and_run_viterbi.html#sphx-glr-examples-08-mocap6-plot-03-demo-interpret-hdphmm-params-and-run-viterbi-py | |
# start_prob_K : 1D array size K, sums to one | |
# trans_proba_KK : 2D array, size K x K, rows sum to one | |
# log_lik_seq_TK : 2D array, size T x K |
S = 10 # num samples throughout | |
## FIRST, REMEMBER THE COMMON PARAMETERIZATION | |
# x ~ Normal(m, sigma^2) | |
# m is a real number | |
# sigma >= 0 is a standard deviation | |
m = 2 | |
sigma = 0.1 |
import pandas as pd | |
import numpy as np | |
import time | |
prng = np.random.RandomState(0) | |
n_subj = 20000 | |
n_rows = 1000000 | |
# Randomly assign to one of 20000 subjects |
import numpy as np | |
import pandas as pd | |
import argparse | |
def convert_ordered_dx_df_to_indicator_df( | |
ordered_dx_df, | |
list_of_possible_icd_code_values=None, | |
list_of_possible_icd_code_names=None): | |
''' Convert rank-ordered diagnosis codes into indicator format |
We assume that there are two users (A and B). A is gonna delete the bad files. B is gonna receive the changes.
At the start, we need A and B to have the SAME version history.
We'll assume there are no branches other than master.