Skip to content

Instantly share code, notes, and snippets.

@bikashckarmokar
bikashckarmokar / kube124-docker.sh
Created Oct 18, 2022 — forked from saiyam1814/kube124-docker.sh
Kubernetes 1.24 with dockerd
View kube124-docker.sh
curl -s https://packages.cloud.google.com/apt/doc/apt-key.gpg | sudo apt-key add -
echo "step1"
echo "deb https://apt.kubernetes.io/ kubernetes-xenial main" | sudo tee /etc/apt/sources.list.d/kubernetes.list
echo "kubeadm install"
sudo apt update -y
sudo apt -y install vim git curl wget kubelet=1.24.0-00 kubeadm=1.24.0-00 kubectl=1.24.0-00
wget https://github.com/Mirantis/cri-dockerd/releases/download/v0.2.0/cri-dockerd-v0.2.0-linux-amd64.tar.gz
tar -xvf cri-dockerd-v0.2.0-linux-amd64.tar.gz
mkdir -p /usr/local/bin
install -o root -g root -m 0755 ./cri-dockerd /usr/local/bin/cri-dockerd
@bikashckarmokar
bikashckarmokar / bash-cheatsheet.sh
Created Sep 21, 2022 — forked from vik-y/bash-cheatsheet.sh
Bash CheatSheet for UNIX Systems
View bash-cheatsheet.sh
#!/bin/bash
#####################################################
# Name: Bash CheatSheet for Mac OSX
#
# A little overlook of the Bash basics
#
# Usage:
#
# Author: J. Le Coupanec
# Date: 2014/11/04
@bikashckarmokar
bikashckarmokar / proportions_of_missing_data_in_dataframe_columns.py Calculate percentage of NaN values in a Pandas Dataframe for each column. Exclude columns that do not contain any NaN values
View proportions_of_missing_data_in_dataframe_columns.py
# Author: Luke Schoen 2017
import pandas as pd
import numpy as np
import functools
# Create DataFrame
# df = pd.DataFrame(np.random.randn(10,2))
# Populate with NaN values
df = pd.DataFrame({'col1': ['1.111', '2.111', '3.111', '4.111'], 'col2': ['4.111', '5.111', np.NaN, '7.111'], 'col3': ['8', '9', np.NaN, np.NaN], 'col4': ['12', '13', '14', '15']})
View Classifiers evaluation
#!/usr/bin/env python
# encoding: utf-8
from sklearn.grid_search import GridSearchCV
from sklearn.naive_bayes import GaussianNB
from sklearn.linear_model import LogisticRegression
from sklearn.linear_model import Perceptron
from sklearn.ensemble import RandomForestClassifier
from sklearn.ensemble import ExtraTreesClassifier
from sklearn.ensemble import GradientBoostingClassifier