質問編集履歴

1

コードの挿入

2020/05/11 00:35

投稿

Yuca
Yuca

スコア0

test CHANGED
File without changes
test CHANGED
@@ -30,7 +30,61 @@
30
30
 
31
31
 
32
32
 
33
+ ```#!/usr/bin/env python3
34
+
35
+ # -*- coding: utf-8 -*-
36
+
37
+ """
38
+
39
+ Created on Sun May 10 15:26:30 2020
40
+
41
+
42
+
43
+ @author: yuuka
44
+
45
+ """
46
+
47
+ import glob
48
+
49
+ import os
50
+
51
+ import random
52
+
53
+ import cvs
54
+
55
+
56
+
57
+ path="/Users/yuuka/Desktop/PDPN/"
58
+
59
+ outpath="/Users/yuuka/Desktop/PDPN2"
60
+
61
+ num_sample_all=568
62
+
63
+
64
+
33
- ```ここに言語名を入力
65
+ # sheet name
66
+
67
+ root_dir='.\sample_1\'
68
+
69
+
70
+
71
+ # get each directory
72
+
73
+ dir_list=glob.glob(no+'\*.jpg')
74
+
75
+
76
+
77
+ for no in sir_list:
78
+
79
+ # get each directory
80
+
81
+ file_list=glob/glob(root_dir+'*')
82
+
83
+ # sort
84
+
85
+ file_list.sort()
86
+
87
+ for i, path in enumerate(file_list):
34
88
 
35
89
 
36
90