-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtestgroup.py
More file actions
45 lines (27 loc) · 931 Bytes
/
testgroup.py
File metadata and controls
45 lines (27 loc) · 931 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
#!/usr/bin/env python2.7
# -*- coding: utf-8 -*-
import os,sys
sys.path.append('/opt/render')
if __name__ == '__main__':
from tools import mysql
from tools import bash
from colorama import *
init(autoreset=True)
import shutil, time
if len(sys.argv)==0: os._exit()
id_segm = sys.argv[1]
print (id_segm)
(segments, segDur) = mysql.selectSegments(id_segm)
segParam = segments[0]
print(segParam)
(dir, file) = os.path.split(segParam['path'])
(fileBaseName, fileExtension)=os.path.splitext(file)
command="rclone copy --include '*.jpg' ibm:"+str(segParam['container'])+"/"+dir+" /tmp/"+dir
bash.runCMD(command)
allParam={}
allParam['local_output']='/tmp'
allParam['audio_bpm']=1
feature_extract(segments, allParam, True)
# keras_vgg16.distances('oE6boCQrzU8', files, images_predicted)
# time.sleep(10)
# shutil.rmtree('/tmp/'+dir)