code
stringlengths
3
6.57k
self._terminated.is_set()
ti.set_state(State.FAILED)
self.change_state(ti.key, State.FAILED)
self._run_task(ti)
_run_task(self, ti: TaskInstance)
self.log.debug("Executing task: %s", ti)
self.tasks_params.pop(ti.key, {})
self.change_state(key, State.SUCCESS)
self.change_state(key, State.FAILED)
self.log.exception("Failed to execute task: %s.", str(e)
str(task_instance)
trigger_tasks(self, open_slots: int)
self.queued_tasks.items()
range(min((open_slots, len(self.queued_tasks)
sorted_queue.pop(0)
self.queued_tasks.pop(key)
self.running.add(key)
self.tasks_to_run.append(ti)
end(self)
self.log.info("Setting %s to %s", ti.key, State.UPSTREAM_FAILED)
ti.set_state(State.UPSTREAM_FAILED)
self.change_state(ti.key, State.UPSTREAM_FAILED)
terminate(self)
self._terminated.set()
change_state(self, key: TaskInstanceKeyType, state: str)
self.log.debug("Popping %s from executor task queue.", key)
self.running.remove(key)
Foundation (ASF)
ListServicesRequest(RoaRequest)
__init__(self)
RoaRequest.__init__(self, 'eas', '2021-07-01', 'ListServices','eas')
self.set_uri_pattern('/api/v2/services')
self.set_method('GET')
hasattr(self, "endpoint_map")
setattr(self, "endpoint_map", endpoint_data.getEndpointMap()
hasattr(self, "endpoint_regional")
setattr(self, "endpoint_regional", endpoint_data.getEndpointRegional()
get_Filter(self)
self.get_query_params()
get('Filter')
set_Filter(self,Filter)
self.add_query_param('Filter',Filter)
get_PageSize(self)
self.get_query_params()
get('PageSize')
set_PageSize(self,PageSize)
self.add_query_param('PageSize',PageSize)
get_Sort(self)
self.get_query_params()
get('Sort')
set_Sort(self,Sort)
self.add_query_param('Sort',Sort)
get_PageNumber(self)
self.get_query_params()
get('PageNumber')
set_PageNumber(self,PageNumber)
self.add_query_param('PageNumber',PageNumber)
get_Order(self)
self.get_query_params()
get('Order')
set_Order(self,Order)
self.add_query_param('Order',Order)
Copyright (c)
test_prepare_hparams(must_exist_attributes, deeprec_resource_path)
os.path.join(deeprec_resource_path, "mind", "utils", "embedding.npy")
os.path.join(deeprec_resource_path, "mind", "utils", r"nrms.yaml")
os.path.exists(yaml_file)
os.path.join(deeprec_resource_path, "mind", "utils")
hasattr(hparams, must_exist_attributes)
test_load_yaml_file(deeprec_resource_path)
os.path.join(deeprec_resource_path, "mind", "utils", r"nrms.yaml")
os.path.exists(yaml_file)
os.path.join(deeprec_resource_path, "mind", "utils")
load_yaml(yaml_file)
mpimg.imread('test_images/solidWhiteRight.jpg')
print('This image is:', type(image)
plt.imshow(image)
plt.imshow(gray, cmap='gray')
grayscale(img)
plt.imshow(gray, cmap='gray')
cv2.cvtColor(img, cv2.COLOR_RGB2GRAY)
cv2.imread()
cv2.cvtColor(img, cv2.COLOR_BGR2GRAY)
hsv(img)
cv2.cvtColor(img, cv2.COLOR_RGB2HSV)
canny(img, low_threshold, high_threshold)
cv2.Canny(img, low_threshold, high_threshold)
gaussian_blur(img, kernel_size)
cv2.GaussianBlur(img, (kernel_size, kernel_size)
region_of_interest(img, vertices)
np.zeros_like(img)
len(img.shape)
cv2.fillPoly(mask, vertices, ignore_mask_color)
cv2.bitwise_and(img, mask)
draw_lines(img, lines, color=[255, 0, 0], thickness=13)
slope ((y2-y1)
inplace (mutates the image)
weighted_img()
np.zeros(shape=(len(lines)
enumerate(lines)