Skip to content

Instantly share code, notes, and snippets.

View rozeappletree's full-sized avatar
🐊
Dedicated to the fool & the foolish.

Asapanna Rakesh rozeappletree

🐊
Dedicated to the fool & the foolish.
View GitHub Profile
import random, math
import numpy as np
import matplotlib.pyplot as plt
import matplotlib.patheffects as mpe
"""
dataset
"""
@rozeappletree
rozeappletree / 01_how-to-train-distilbert-lm-scratch.ipynb
Last active February 2, 2021 17:37
01_how-to-train-masked-lm-distilbert.ipynb
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@rozeappletree
rozeappletree / crop_cell.py
Created February 2, 2021 09:20
detectron2 crop results
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 """
@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.
@rozeappletree
rozeappletree / train_-mapnet.ipynb
Last active January 23, 2021 13:49
Train_ MAPNet.ipynb
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@rozeappletree
rozeappletree / psql.ipynb
Created January 19, 2021 18:42
psql.ipynb
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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!")
@rozeappletree
rozeappletree / train_-mapnet.ipynb
Last active January 22, 2021 15:02
Train_ MAPNet.ipynb
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@rozeappletree
rozeappletree / multiprocessing.py
Created November 4, 2020 04:54
multiprocessing in python
# 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))
@rozeappletree
rozeappletree / demoparser.ipynb
Last active October 9, 2020 10:47
demoparser.ipynb
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.