Skip to content

Instantly share code, notes, and snippets.

View J-Savage's full-sized avatar

Jared Savage J-Savage

View GitHub Profile
@J-Savage
J-Savage / python data preprocessing.ipynb
Last active October 5, 2025 16:13
[Python preprocessing] #Python
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@J-Savage
J-Savage / trajectory.py
Created October 4, 2025 12:16
[Trajectory calculation] #Python
import numpy as np
import matplotlib.pyplot as plt
# Constants
g = 9.81 # Gravity (m/s^2)
rho = 1.225 # Air density (kg/m^3)
Cd = 0.3 # Drag coefficient
A = 0.05 # Cross-sectional area (m^2)
m = 50 # Mass of projectile (kg)
v0 = 800 # Muzzle velocity (m/s)
@J-Savage
J-Savage / workflow_map
Last active October 4, 2025 17:46
[Tidymodels workflow map setup] #R #Tidymodels
// vim: syntax=R
MODE <- "regression"
lr_spec <- linear_reg(mode = MODE,engine = "glmnet", penalty = 0)
rf_spec <- rand_forest(mode = MODE, engine = "ranger")
lgb_spec <- boost_tree(mode = MODE, engine = "lightgbm")
xgb_spec <- boost_tree(mode = MODE, engine = "xgboost")
knn_spec <- nearest_neighbor(mode = MODE, engine = "kknn")
svm_spec <- svm_rbf(mode = MODE, engine = "kernlab")
dt_spec <- decision_tree(mode = MODE, engine = "rpart")