Skip to content

Instantly share code, notes, and snippets.

View anuragbisht12's full-sized avatar

Anurag Bisht anuragbisht12

View GitHub Profile
class Node:
def __init__(self, data):
"""
Node with data and reference to next element
"""
self.data = data
self.next = None
class CircularLinkedList:
class Node:
def __init__(self, data):
"""
Node element stores the data and reference
to previous and next node
"""
self.data = data
self.next = None
self.prev = None
class Node:
def __init__(self, data):
"""
Node class stores data
next is a pointer to next node of the linked list
"""
self.data = data
self.next = None
class MyQueue:
"""
Class to implement queue
"""
def __init__(self):
self.queue_list = []
def is_empty(self):
return self.size() == 0
@anuragbisht12
anuragbisht12 / stack.py
Last active October 12, 2020 12:38
Stack.py
class MyStack:
def __init__(self):
self.stack_list = []
def is_empty(self):
return len(self.stack_list) == 0
def top(self):
if self.is_empty():
return None
from fastapi import FastAPI
import uvicorn
from pydantic import BaseModel
import joblib,os
yourmodel=open('LOCATION','rb')
model=joblib.load(yourmodel)
app = FastAPI()