From 1a7f21540b54afeb716692e12b80fc843f519885 Mon Sep 17 00:00:00 2001 From: Siarhei Siniak Date: Wed, 28 Jul 2021 08:25:04 +0300 Subject: [PATCH] [~] Refactor --- d1/mlb_player_v5.py | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/d1/mlb_player_v5.py b/d1/mlb_player_v5.py index 676b2a4..7ea762a 100644 --- a/d1/mlb_player_v5.py +++ b/d1/mlb_player_v5.py @@ -1,19 +1,19 @@ import os if os.system(r''' pip show alphapose''') != 0: - t1 = r''' - rm -fr /kaggle/working/AlphaPose - pip install pyyaml==5.2 - pip install scipy==1.1.0 - git clone https://github.com/WildflowerSchools/AlphaPose - python -m pip install cython gdown - apt-get install libyaml-dev - cd /kaggle/working/AlphaPose && python setup.py build develop - ''' + t1 = r''' + rm -fr /kaggle/working/AlphaPose + pip install pyyaml==5.2 + pip install scipy==1.1.0 + git clone https://github.com/WildflowerSchools/AlphaPose + python -m pip install cython gdown + apt-get install libyaml-dev + cd /kaggle/working/AlphaPose && python setup.py build develop + ''' - for o in t1.splitlines(): - print(o) - assert os.system(o) == 0 + for o in t1.splitlines(): + print(o) + assert os.system(o) == 0 import os #!git clone https://github.com/MVIG-SJTU/AlphaPose.git @@ -41,12 +41,12 @@ for o1, o2 in [ ), ]: os.makedirs(os.path.split(o2)[0], exist_ok=True) - if not os.path.exists(o2): - gdown.download( - 'https://drive.google.com/u/0/uc?export=download&confirm=f_Ix&id=%s' % o1, - o2, - quiet=False - ) + if not os.path.exists(o2): + gdown.download( + 'https://drive.google.com/u/0/uc?export=download&confirm=f_Ix&id=%s' % o1, + o2, + quiet=False + ) assert os.system(r'''