Posts

Showing posts from June, 2022

Python - Data Science - Mean/Median/Mode

Image
What is a Mean? A mean is the simple mathematical average of a set of two or more numbers. Eg:  The sum of the 57 Boys weight is 231.51 and hence the mean is 231.51/57 = 4.06 What is the Median? The median is the middle number in a sorted, ascending or descending, list of numbers and can be more descriptive of that data set than the average. For example, in a data set of {3, 13, 2, 34, 11, 26, 47}, the sorted order becomes {2, 3, 11, 13, 26, 34, 47}. The median is the number in the middle {2, 3, 11, 13, 26, 34, 47}, which in this instance is 13 since there are three numbers on either side. For example, in a data set of {3, 13, 2, 34, 11, 17, 27, 47}, the sorted order becomes {2, 3, 11, 13, 17, 27, 34, 47}.  The median is the average of the two numbers in the middle which in this case is fifteen {2, 3, 11, 13, 17, 27, 34, 47} -> {(13 + 17) ÷ 2 = 15}. What is a Mode? The is the most frequent observation (or observations) in a sample. We have the sample [4, 1, 2, 2, 3, 5]...

Kubernetes Storage - NFS

Image
  Post shows how to use NFS as Persistent volumes and claim in Kubernetes pod. Setting up NFS Server: Install the NFS package. root@glusterfs:/# apt install -y nfs-server root@glusterfs:/# mkdir /data root@glusterfs:/# cat /etc/exports | grep -v "^#" /data *(rw,no_subtree_check,no_root_squash) root@glusterfs:/# root@glusterfs:/# systemctl status nfs-server root@glusterfs:/# systemctl enable  nfs-server root@glusterfs:/# exportfs -arv exporting *:/data root@glusterfs:/# root@glusterfs:/# chmod -R 777 /data/ We are done with the NFS server and lets mount it on the client. root@master:/# cat /etc/fstab | grep -i data 192.168.163.129:/data /data nfs4 defaults 0 0 root@master:/# You may have to install - nfs-client on the client side. root@master:/# mount -a root@master:/# df -TH /data Filesystem            Type  Size  Used Avail Use% Mounted on 192.168.163.129:/data nfs4   21G  8.5G   11G  44% /data root@ma...