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
index = input("You are giving a exp_dir which supposed to contain only one trial, " | |
"but we found many. \nPlease input the index of the trial you want to " | |
"visualize:\n\n{}\nYour index:".format( | |
"".join(["{}: {}\n".format(i, t) for i, t in enumerate(potential_trial_paths)]))) | |
"""The output look as following, it's quite clean. | |
You are giving a exp_dir which supposed to contain only one trial, but we found many. | |
Please input the index of the trial you want to visualize: | |
0: /Users/pengzhenghao/ray_results/debug/PPO_tollgate_0_2019-04-09_21-10-02k6f8lt62 |
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
from collections import deque | |
class FPSTimer(object): | |
def __init__(self, log_interval=10): | |
self.cnt = 0 | |
self.log_interval = log_interval | |
self.queue = deque(maxlen=log_interval) | |
self.queue.append(time.time()) | |
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
#!/usr/bin/env bash | |
arr=(1 10 100) | |
for d in ${arr[*]} | |
do | |
echo $d | |
echo | |
done |
NewerOlder