概要
タイトルの通り( *˙︶˙*)وグッ!
実行環境
- Google Cloud Platform の VertexAI
- jupyter notebook
ソースコード
これで実現できた。
R言語
length <- 100000
pb <- txtProgressBar(min = 0, max = length, style = 3)
# 空のリストを作成
list_index = list()
count = 0
for (index in 1:length){
if (index %% 1000 == 0) {
list_index = append(list_index, index)
}
count = count + 1
setTxtProgressBar(pb, count)
}
実行結果
こんな感じになって、リアルタイムに進捗が更新されるよ!( *¯ ꒳¯*)✨
補足
もしかしたら何かライブラリ使っているのかもしれないけど、 VertexAI 上だったからなのか、意識せずに、 txtProgressBar
などを呼び出すことができた。
ローカルマシン上だとこうはいかないのかもしれない[壁]д・)チラッ