Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def load(self, files, gcsBucket='', eeAsset=''):
if gcsBucket[-1] != '/':
gcsBucket += '/'
if eeAsset[-1] != '/':
eeAsset += '/'
for f in files:
fName = os.path.basename(f)
utils.push_to_gcs(f, gcsBucket)
bso = gcsBucket + fName
tstr = fName.split('.')[3]
t = '{0}-{1}-{2}:{3}:00'.format(tstr[:4],
tstr[4:6], tstr[6:11], tstr[11:])
utils.push_to_gee(bso, eeAsset, properties={'time_start': t})
return
def load(self,files,gcsBucket='',eeAsset=''):
if gcsBucket[-1] != '/':
gcsBucket += '/'
if eeAsset[-1] != '/':
eeAsset += '/'
for f in files:
fName = os.path.basename(f)
utils.push_to_gcs(f,gcsBucket)
bso = gcsBucket + fName
tstr = fName.split('.')[3]
t = '{0}-{1}-{2}:{3}:00'.format(tstr[:4],tstr[4:6],tstr[6:11],tstr[11:])
utils.push_to_gee(bso,eeAsset,properties={'time_start':t})
return