code
stringlengths
3
6.57k
attrs.pop("schema", None)
attrs.pop("table", False)
EventDefinitionError(f"Class {name} did not declare a JSON schema.")
cls._collect_properties(schema_spec)
list(properties_dict.keys()
cls.property_to_python(spec)
properties_dict.items()
jsonschema.RefResolver(cls.schema_path, schema_spec)
super_new(cls, name, bases, attrs, **kwargs)
_collect_properties(schema)
all (including nested and conditional)
dict()
isinstance(schema, list)
enumerate(schema)
isinstance(schema, dict)
schema.items()
props.update(value)
props.update(EventMeta._collect_properties(value)
property_to_python(property_spec)
property_spec.get("format")
property_spec.get("type")
isinstance(proptypes, list)
callables.append(to_none)
callables.append(to_bool)
callables.append(int)
callables.append(float)
Gcp(VaultApiBase)
Engine (API)
configure(self, credentials=None, ttl=None, max_ttl=None, mount_point=DEFAULT_MOUNT_POINT)
credentials (either file contents or '@path/to/file')
credentials (i.e. service account keys)
credentials (i.e. service account keys)
utils.format_url('/v1/{mount_point}/config', mount_point=mount_point)
read_config(self, mount_point=DEFAULT_MOUNT_POINT)
utils.format_url('/v1/{mount_point}/config', mount_point=mount_point)
string (expects HCL or JSON format in raw or base64-encoded string)
set (access_token role sets only)
join(ALLOWED_SECRETS_TYPES)
isinstance(bindings, dict)
json.dumps(bindings)
replace(' ', '')
logging.debug('bindings: %s' % bindings)
rotate_roleset_account(self, name, mount_point=DEFAULT_MOUNT_POINT)
account (and/or keys)
rotate_roleset_account_key(self, name, mount_point=DEFAULT_MOUNT_POINT)
read_roleset(self, name, mount_point=DEFAULT_MOUNT_POINT)
list_rolesets(self, mount_point=DEFAULT_MOUNT_POINT)
utils.format_url('/v1/{mount_point}/rolesets', mount_point=mount_point)
delete_roleset(self, name, mount_point=DEFAULT_MOUNT_POINT)
generate_oauth2_access_token(self, roleset, mount_point=DEFAULT_MOUNT_POINT)
Secret (IAM Service Account Creds)
GET ('read')
values (i.e. 1k)
join(SERVICE_ACCOUNT_KEY_ALGORITHMS)
join(SERVICE_ACCOUNT_KEY_TYPES)
format(method=method)
exceptions.ParamValidationError(error_message)
Openpose (Windows/Ubuntu/OSX)
os.path.dirname(os.path.realpath(__file__)
folder (Release/x64 etc.)
sys.path.append(dir_path + '/../../python/openpose/Release')
folder (Release/x64 etc.)
sys.path.append('../../python')
sys.path.append('/usr/local/python')
print('Error: OpenPose library could not be found. Did you enable `BUILD_PYTHON` in CMake and have this Python script in the right folder?')
argparse.ArgumentParser()
parser.add_argument("--image_path", default="../../../examples/media/COCO_val2014_000000000241.jpg", help="Process an image. Read all standard formats (jpg, png, bmp, etc.)
parser.parse_known_args()
Params (refer to include/openpose/flags.hpp for more parameters)
dict()
range(0, len(args[1])
len(args[1])
curr_item.replace('-','')
curr_item.replace('-','')
op.init_argv(args[1])
op.OpenposePython()
op.WrapperPython()
opWrapper.configure(params)
opWrapper.start()
op.Datum()
cv2.imread(args[0].image_path)
opWrapper.emplaceAndPop([datum])
print("Body keypoints: \n" + str(datum.poseKeypoints)
print("Face keypoints: \n" + str(datum.faceKeypoints)
print("Left hand keypoints: \n" + str(datum.handKeypoints[0])
print("Right hand keypoints: \n" + str(datum.handKeypoints[1])
cv2.imshow("OpenPose 1.4.0 - Tutorial Python API", datum.cvOutputData)
cv2.waitKey(0)
ConvPaddedLayersTest(test_utils.TestCase)
self.session(use_gpu=True)
layers.Conv2DLayer.Params()
conv_layers_builder.Builder.Params()
conv_layers_with_time_padding.ConvBatchNormLayer.Params()
builder_params.Instantiate()
p1.Instantiate()
p2.Instantiate()
tf.constant(np.random.normal(size=[4, 5, 6, 3])
np.full([4, 5], 0.0)
tf.constant(conv_pad, tf.float32)
l1.theta.Transform(tf.identity)