Skip to content

Instantly share code, notes, and snippets.

View isaaccorley's full-sized avatar
🌴

Isaac Corley isaaccorley

🌴
View GitHub Profile
@isaaccorley
isaaccorley / InfraredSolarModules_RandomForest.ipynb
Created February 6, 2025 18:41
InfraredSolarModules RandomForest 2ez
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@isaaccorley
isaaccorley / cs210_week2.ipynb
Created September 25, 2024 00:00
cs210_week2.ipynb
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.
@isaaccorley
isaaccorley / knn_eval_callback.py
Created May 31, 2023 19:22
PyTorch Lightning KNN Classifier Evaluation Callback
# pip install torch lightning scikit-learn numpy tqdm faissknn
import lightning.pytorch as pl
import numpy as np
import torch
from faissknn import FaissKNNClassifier
from lightning.pytorch.utilities import rank_zero_only
from sklearn.metrics import accuracy_score, f1_score, precision_score, recall_score
from tqdm import tqdm
@isaaccorley
isaaccorley / download_fair1mv2.sh
Created April 22, 2023 00:04
Download the FAIR1M 2.0 dataset using gdown
# download test set
mkdir -p fair1m/train/part1
mkdir fair1m/train/part2
mkdir fair1m/validation
mkdir fair1m/test
cd fair1m/train/part1
gdown 1LWT_ybL-s88Lzg9A9wHpj0h2rJHrqrVf # train/part1/images.zip
gdown 1CnOuS8oX6T9JMqQnfFsbmf7U38G6Vc8u # train/part1/labelXml.zip
cd ..
@isaaccorley
isaaccorley / torchgeo_ucmerced_classifier.ipynb
Last active September 23, 2022 20:36
TorchGeo UCMerced Classifier Example
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@isaaccorley
isaaccorley / etci2021_train.py
Last active August 31, 2022 00:58
TorchGeo Minimum Segmentation Train/Val Example
import torch
import torch.nn as nn
import torch.optim as optim
import segmentation_models_pytorch as smp
from torchmetrics import Accuracy
from tqdm import tqdm
from torchgeo.datasets import ETCI2021
from torchgeo.datamodules import ETCI2021DataModule
@isaaccorley
isaaccorley / untitled0.ipynb
Last active October 16, 2021 21:23
resample-benchmarkipynb
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@isaaccorley
isaaccorley / free-wsl.ps
Created July 28, 2021 21:57
Free unused space from WSL2
wsl --shutdown
diskpart
select vdisk file="C:\Users\<user>\AppData\Local\Packages\CanonicalGroupLimited.Ubuntu20.04onWindows_79rhkp1fndgsc\LocalState\ext4.vhdx"
attach vdisk readonly
compact vdisk
detach vdisk
exit