code
stringlengths
3
6.57k
NonProjectedImplicitEulerResidualOperator(operator, mass, self.rhs, self.dt, self.product)
self.logger.block('Projecting residual operator ...')
project(self.operator, self.residual_range, self.RB, product=None)
project(self.mass, self.residual_range, self.RB, product=None)
project(self.rhs, self.residual_range, None, product=None)
ImplicitEulerResidualOperator(operator, mass, rhs, self.dt)
reconstruct(self, u)
u.norm()
u.norm(self.product)
lincomb(u.to_numpy()
ImplicitEulerResidualOperator(Operator)
__init__(self, operator, mass, rhs, dt, name=None)
self.__auto_init(locals()
rhs.as_range_array()
apply(self, U, U_old, mu=None)
self.operator.apply(U, mu=mu)
V.axpy(1./self.dt, self.mass.apply(U, mu=mu)
V.axpy(-1./self.dt, self.mass.apply(U_old, mu=mu)
isinstance(self.rhs, ZeroOperator)
self.rhs.as_range_array(mu)
len(V)
len(V)
projected_to_subbasis(self, dim_range=None, dim_source=None, name=None)
ImplicitEulerResidualOperator(project_to_subbasis(self.operator, dim_range, dim_source)
project_to_subbasis(self.mass, dim_range, dim_source)
project_to_subbasis(self.rhs, dim_range, None)
NonProjectedImplicitEulerResidualOperator(ImplicitEulerResidualOperator)
__init__(self, operator, mass, rhs, dt, product)
super()
__init__(operator, mass, rhs, dt)
apply(self, U, U_old, mu=None)
super()
apply(U, U_old, mu=mu)
self.product.apply_inverse(R)
R_riesz.norm()
np.nan_to_num(inversel2)
R_riesz.scal(np.sqrt(R_riesz.pairwise_inner(R)
projected_to_subbasis(self, dim_range=None, dim_source=None, name=None)
self.with_(operator=project_to_subbasis(self.operator, None, dim_source)
project_to_subbasis(self.mass, None, dim_source)
logging.getLogger(__name__)
prepend_bucketname(name)
os.getenv('BUCKETNAME_PREFIX', "gsfc-ngap-{}-".format(os.getenv('MATURITY', 'DEV')
lower()
format(prefix, name)
hmacsha256(key, string)
hmac.new(key, string.encode('utf-8')
get_presigned_url(session, bucket_name, object_name, region_name, expire_seconds, user_id, method='GET')
datetime.utcnow()
strftime('%Y%m%dT%H%M%SZ')
format(bucket_name, "."+region_name if region_name != "us-east-1" else "")
join([datez, region_name, "s3", "aws4_request"])
format(cred, aws4_request)
format(user_id)
urllib.parse.quote_plus(cred_string)
format(expire_seconds)
urllib.parse.quote_plus(token)
join(parts)
sha256(can_req.encode('utf-8')
hexdigest()
join(["AWS4-HMAC-SHA256", timez, aws4_request, can_req_hash])
hmacsha256( "AWS4{0}".format(secret)
encode('utf-8')
digest()
hmacsha256( StepOne, region_name )
digest()
hmacsha256( StepTwo, "s3")
digest()
hmacsha256( StepThree, "aws4_request")
digest()
hmacsha256(SigningKey, stringtosign)
hexdigest()
get_bucket_dynamic_path(path_list, b_map)
log.debug("Pathparts is {0}".format(", ".join(path_list)
if (mapping and isinstance(map_dict, str)
isinstance(map_dict, dict)
log.debug(f'mapping: {mapping}')
path_list.pop(0)
join(path_list)
join(mapping)
log.info("Bucket mapping was {0}, object was {1}".format(bucket_path, object_name)
prepend_bucketname(bucketname)
mapping.append(path_part)
log.debug("Found {0}, Mapping is now {1}".format(path_part, "/".join(mapping)
log.warning("Could not find {0} in bucketmap".format(path_part)
log.debug('said bucketmap: {}'.format(map_dict)
process_varargs(varargs: list, b_map: dict)
log.warning('Deprecated process_varargs()
process_request(varargs, b_map)
process_request(varargs, b_map)
varargs.split("/")
len(varargs)
join(varargs)
len(varargs)
os.getenv('USE_REVERSE_BUCKET_MAP', 'FALSE')
lower()
get_bucket_dynamic_path(varargs, b_map)
varargs.pop(-1)
join(varargs)
bucket_prefix_match(bucket_check, bucket_map, object_name="")