This file contains 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 pathlib import Path | |
import pandas as pd | |
DATA_FOLDER = Path("data") | |
# get all csv files in data and its subfolders | |
for csv_file in DATA_FOLDER.rglob("*.csv"): | |
csv_full_path = csv_file.resolve() |
This file contains 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 time | |
from functools import wraps | |
from pathlib import Path | |
from typing import Callable, Optional, Union | |
import numpy as np | |
import pandas as pd | |
import ray | |
def pipeline_logger(function: Callable): |
This file contains 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 torch | |
import cv2 | |
from tags import label_bbbox | |
model = torch.hub.load("ultralytics/yolov5", "yolov5s", pretrained=True, classes=80) | |
model.conf = 0.75 | |
capture = cv2.VideoCapture(0) | |
assert capture.isOpened(), "Cannot open camera" |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains 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 torch | |
import torch.nn as nn | |
from transformers import AutoTokenizer | |
from transformers import AutoModelForSequenceClassification | |
MODEL_NAME = "microsoft/deberta-xlarge-mnli" | |
class Model: |
This file contains 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 pytrends.request import TrendReq | |
from sklearn.ensemble import GradientBoostingRegressor | |
from sklearn.neighbors import KNeighborsRegressor | |
from sktime.forecasting.base import ForecastingHorizon | |
from sktime.forecasting.compose import EnsembleForecaster, ReducedForecaster | |
from sktime.forecasting.model_selection import temporal_train_test_split | |
from sktime.performance_metrics.forecasting import smape_loss | |
from sktime.utils.plotting import plot_series | |
This file contains 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 numpy as np | |
import pandas as pd | |
from sklearn.model_selection import train_test_split | |
from sklearn.metrics import ( | |
accuracy_score, | |
precision_score, | |
recall_score, | |
confusion_matrix, | |
) | |
from sklearn.compose import ColumnTransformer, make_column_selector as selector |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains 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 numpy as np | |
import pandas as pd | |
from sklearn.model_selection import train_test_split | |
from sklearn.metrics import accuracy_score, precision_score, recall_score, confusion_matrix | |
from sklearn.compose import ColumnTransformer, make_column_selector as selector | |
from sklearn.pipeline import Pipeline | |
from sklearn.impute import SimpleImputer | |
from sklearn.preprocessing import MinMaxScaler,OneHotEncoder, LabelEncoder | |
import torch |