本文整理匯總了Python中src.utils.mkdir_if_missing方法的典型用法代碼示例。如果您正苦於以下問題:Python utils.mkdir_if_missing方法的具體用法?Python utils.mkdir_if_missing怎麽用?Python utils.mkdir_if_missing使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類src.utils
的用法示例。
在下文中一共展示了utils.mkdir_if_missing方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: write_room_dimensions_all
# 需要導入模塊: from src import utils [as 別名]
# 或者: from src.utils import mkdir_if_missing [as 別名]
def write_room_dimensions_all(I):
mkdir_if_missing(os.path.join(DATA_DIR, 'processing', 'room-dimension'))
bs_in = ['Area_1', 'Area_2', 'Area_3', 'Area_4', 'Area_5', 'Area_5', 'Area_6']
bs_out = ['area1', 'area2', 'area3', 'area4', 'area5a', 'area5b', 'area6']
transforms = [0, 0, 0, 0, 0, 1, 0]
for i in I:
b_in = bs_in[i]
b_out = bs_out[i]
t = transforms[i]
write_room_dimensions(b_in, b_out, t)
示例2: write_class_maps_all
# 需要導入模塊: from src import utils [as 別名]
# 或者: from src.utils import mkdir_if_missing [as 別名]
def write_class_maps_all(I):
mkdir_if_missing(os.path.join(DATA_DIR, 'processing', 'class-maps'))
bs_in = ['Area_1', 'Area_2', 'Area_3', 'Area_4', 'Area_5', 'Area_5', 'Area_6']
bs_out = ['area1', 'area2', 'area3', 'area4', 'area5a', 'area5b', 'area6']
transforms = [0, 0, 0, 0, 0, 1, 0]
for i in I:
b_in = bs_in[i]
b_out = bs_out[i]
t = transforms[i]
_write_map_files(b_in, b_out, t)