Skip to content

Instantly share code, notes, and snippets.

View NathanDai5287's full-sized avatar

Nathan Dai NathanDai5287

  • San Diego, California
View GitHub Profile
@NathanDai5287
NathanDai5287 / volume.ahk
Created January 5, 2024 17:47
Increment the Volume by Cube Root 2
#SingleInstance Force
round(volume) {
if (volume > 42 and volume < 57) {
return 50
} else {
return volume
}
}
@NathanDai5287
NathanDai5287 / registry.reg
Created March 31, 2023 01:32
Create a new empty file with an arbitrary file extension in Windows
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\.]
@="emptyFile"
[HKEY_CLASSES_ROOT\.\ShellNew]
"NullFile"=""
@="Empty File"
"ItemName"=""
"IconPath"="C:\\windows\\system32\\imageres.dll,2"
@NathanDai5287
NathanDai5287 / classify.py
Created September 26, 2022 06:35
Titanic Survival Classification
import pandas as pd
import numpy as np
from sklearn.preprocessing import LabelEncoder
from sklearn.model_selection import train_test_split
from sklearn.linear_model import LogisticRegression
# combine train and test data because usually the data will not be split
# df = pd.read_csv('data/train.csv').append(pd.read_csv('data/test.csv')).to_csv('data/titanic.csv', index=False)