Skip to content

Instantly share code, notes, and snippets.

View INF800's full-sized avatar
🍁
For truth we seek infinite and beyond.

Asapanna Rakesh INF800

🍁
For truth we seek infinite and beyond.
View GitHub Profile
@INF800
INF800 / 01_how-to-train-distilbert-lm-scratch.ipynb
Last active February 2, 2021 17:37
01_how-to-train-masked-lm-distilbert.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@INF800
INF800 / 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 """
@INF800
INF800 / basic
Last active January 24, 2021 18:00
@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.
@INF800
INF800 / train_-mapnet.ipynb
Last active January 23, 2021 13:49
Train_ MAPNet.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@INF800
INF800 / psql.ipynb
Created January 19, 2021 18:42
psql.ipynb
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!")
@INF800
INF800 / train_-mapnet.ipynb
Last active January 22, 2021 15:02
Train_ MAPNet.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@INF800
INF800 / 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))
@INF800
INF800 / demoparser.ipynb
Last active October 9, 2020 10:47
demoparser.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@INF800
INF800 / heap.py
Last active August 20, 2020 20:31
# =====================================================================================================================
# 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: