Skip to content

Instantly share code, notes, and snippets.

View kulbshar's full-sized avatar

Kulbhushan Sharma kulbshar

  • Seattle, WA
View GitHub Profile
@kulbshar
kulbshar / knn_impute.py
Created May 28, 2023 23:38 — forked from YohanObadia/knn_impute.py
Imputation of missing values with knn.
import numpy as np
import pandas as pd
from collections import defaultdict
from scipy.stats import hmean
from scipy.spatial.distance import cdist
from scipy import stats
import numbers
def weighted_hamming(data):
@kulbshar
kulbshar / knn_impute.py
Created May 28, 2023 23:37 — forked from YohanObadia/knn_impute.py
Imputation of missing values with knn.
import numpy as np
import pandas as pd
from collections import defaultdict
from scipy.stats import hmean
from scipy.spatial.distance import cdist
from scipy import stats
import numbers
def weighted_hamming(data):

MySQL Cheat Sheet

Help with SQL commands to interact with a MySQL database

MySQL Locations

  • Mac /usr/local/mysql/bin
  • Windows /Program Files/MySQL/MySQL version/bin
  • Xampp /xampp/mysql/bin

Add mysql to your PATH

#!/bin/bash
# Make Sure the script is being executed with superuser privileges.
if [[ "${UID}" -ne 0 ]]
then
echo "Please run with sudo or as root."
exit 1
fi