Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import numpy as np | |
import matplotlib.pyplot as plt | |
def get_bboxes_from(output): | |
""" returns list of bboxes """ | |
return outputs["instances"].__dict__['_fields']['pred_boxes'].__dict__['tensor'] | |
def crop(bbox, in_img: np.ndarray): | |
""" bbox is a list with xmin, ymin, xmax, ymax """ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@startuml | |
!define LIGHTSTYLE | |
!includeurl https://gist.githubusercontent.com/rakesh4real/39df62ab1d17d252e20d42e9ef389c42/raw/ab750998a1ebd9ead7fbd4e5e20ad93c55bbb028/plantuml_style.puml | |
class Object << general >> | |
Object <|--- ArrayList : parent | |
note top of Object : In java, every class\nextends this one. |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def train(): | |
tf.global_variables_initializer().run() | |
could_load, checkpoint_counter = load() | |
if could_load: | |
start_epoch = (int)(checkpoint_counter / num_batches) | |
start_batch_id = checkpoint_counter - start_epoch * num_batches | |
counter = checkpoint_counter | |
print("[INFO] Checkpoint Load Success!") |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# importing the multiprocessing module | |
import multiprocessing | |
def print_cube(num): | |
""" | |
function to print cube of given num | |
""" | |
while True: | |
print("Cube: {}".format(num * num * num)) | |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# ===================================================================================================================== | |
# Heap | |
# ===================================================================================================================== | |
# Heap is a complete binary tree ( Max. possible ht. is log(n) ) | |
# - Cannot be used for searching ele | |
# - used only for 1. inserting 2. Deleting (that too only max/min) | |
import os, time | |
class Heap: |