This file contains hidden or 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
| class Node: | |
| def __init__(self, data): | |
| """ | |
| Node with data and reference to next element | |
| """ | |
| self.data = data | |
| self.next = None | |
| class CircularLinkedList: |
This file contains hidden or 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
| 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 |
This file contains hidden or 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
| 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 | |
This file contains hidden or 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
| class MyQueue: | |
| """ | |
| Class to implement queue | |
| """ | |
| def __init__(self): | |
| self.queue_list = [] | |
| def is_empty(self): | |
| return self.size() == 0 |
This file contains hidden or 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
| 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 |
This file contains hidden or 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
| from fastapi import FastAPI | |
| import uvicorn | |
| from pydantic import BaseModel | |
| import joblib,os | |
| yourmodel=open('LOCATION','rb') | |
| model=joblib.load(yourmodel) | |
| app = FastAPI() |