Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 Poly: | |
| def __init__(self, *args): | |
| self._coeffs = args | |
| def __repr__(self): | |
| return f"Poly(*{self._coeffs})" | |
| def __add__(self, other): | |
| return Poly(*(x + y for x,y in zip(self._coeffs, other._coeffs))) |
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 Poly: | |
| def __init__(self, *args): | |
| self._coeffs = args | |
| p1 = Poly(4,2,5) | |
| p2 = Poly(1,2,3) |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
| import sklearn | |
| import pandas as pd | |
| import numpy as np | |
| from sklearn.datasets import load_boston | |
| from sklearn.linear_model import LinearRegression | |
| # loading data set | |
| boston = load_boston() | |
| # data |
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 queue import Queue, PriorityQueue | |
| from threading import Thread | |
| import random | |
| import time | |
| class RawData: | |
| def __init__(self): | |
| self.data_queue = PriorityQueue(maxsize=10) |