Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
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" |
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 | |
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 sklearn.compose import ColumnTransformer | |
from sklearn.pipeline import Pipeline | |
from sklearn.feature_extraction.text import TfidfVectorizer | |
from sklearn.impute import SimpleImputer | |
from sklearn.preprocessing import StandardScaler, OneHotEncoder | |
from sklearn.model_selection import train_test_split, GridSearchCV | |
from sklearn.linear_model import LogisticRegression | |
# assumes classification problem data split with numeric, categorical and text features | |
# [Salary, Bonus, Age, Gender, Descriptions Target] |