Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def getFolder(domain, mode='r'):
username = cfg["hs_username"]
password = cfg["hs_password"]
endpoint = cfg["hs_endpoint"]
bucket = cfg["hs_bucket"]
dir = h5py.Folder(domain, mode=mode, endpoint=endpoint, username=username, password=password, bucket=bucket)
return dir
def getFolder(domain, mode="r"):
username = cfg["hs_username"]
password = cfg["hs_password"]
endpoint = cfg["hs_endpoint"]
bucket = cfg["hs_bucket"]
dir = h5pyd.Folder(domain, endpoint=endpoint, username=username,
password=password, bucket=bucket, mode=mode)
return dir
def getFolder(domain, mode='r'):
username = cfg["hs_username"]
password = cfg["hs_password"]
endpoint = cfg["hs_endpoint"]
dir = h5py.Folder(domain, mode=mode, endpoint=endpoint, username=username, password=password)
return dir
def getFolder(domain):
username = cfg["hs_username"]
password = cfg["hs_password"]
endpoint = cfg["hs_endpoint"]
bucket = cfg["hs_bucket"]
#print("getFolder", domain)
dir = h5py.Folder(domain, endpoint=endpoint, username=username, password=password, bucket=bucket)
return dir
def getFolder(domain):
username = cfg["hs_username"]
password = cfg["hs_password"]
endpoint = cfg["hs_endpoint"]
bucket = cfg["hs_bucket"]
pattern = cfg["pattern"]
query = cfg["query"]
batch_size = 100 # use smaller batchsize for interactively listing of large collections
dir = h5py.Folder(domain, endpoint=endpoint, username=username,
password=password, bucket=bucket, pattern=pattern, query=query, batch_size=batch_size)
return dir
def getHomeFolder():
username = cfg["hs_username"]
password = cfg["hs_password"]
endpoint = cfg["hs_endpoint"]
if not username:
return None
dir = h5pyd.Folder('/home/', username=username, password=password, endpoint=endpoint) # get folder object for root
homefolder = None
for name in dir:
# we should come across the given domain
if username.startswith(name):
# check any folders where the name matches at least part of the username
# e.g. folder: "/home/bob/" for username "bob@acme.com"
path = '/home/' + name + '/'
try:
f = h5pyd.Folder(path, username=username, password=password, endpoint=endpoint)
except IOError as ioe:
# print("got ioe:", ioe)
continue
except Exception as e:
# print("got exception:", e)
continue
if f.owner == username:
def getHomeFolder():
username = cfg["hs_username"]
password = cfg["hs_password"]
endpoint = cfg["hs_endpoint"]
if not username:
return None
dir = h5pyd.Folder('/home/', username=username, password=password, endpoint=endpoint) # get folder object for root
homefolder = None
for name in dir:
# we should come across the given domain
if username.startswith(name):
# check any folders where the name matches at least part of the username
# e.g. folder: "/home/bob/" for username "bob@acme.com"
path = '/home/' + name + '/'
try:
f = h5pyd.Folder(path, username=username, password=password, endpoint=endpoint)
except IOError as ioe:
# print("got ioe:", ioe)
continue
except Exception as e:
# print("got exception:", e)
continue
if f.owner == username:
homefolder = path
f.close()
if homefolder:
break
dir.close()
return homefolder
#