This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 1. find disks | |
sudo fdisk -l | |
# Sample of fdisk result | |
# Disk /dev/sda: 3.7 TiB, 4000787030016 bytes, 7814037168 sectors | |
# Units: sectors of 1 * 512 = 512 bytes | |
# Sector size (logical/physical): 512 bytes / 512 bytes | |
# I/O size (minimum/optimal): 512 bytes / 512 bytes |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ln `which python3` $(dirname `which python3`)/python | |
ln `which pip3` $(dirname `which pip3`)/pip |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo ufw status |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# reference : https://docs.docker.com/engine/installation/linux/docker-ce/ubuntu/ | |
# Remove old Docker | |
sudo apt-get remove docker docker-engine docker.io | |
# Add repository | |
sudo apt-get update | |
sudo apt-get install \ | |
apt-transport-https \ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
library("cranlike") | |
update_PACKAGES(dir="path/to/repos", type="source") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from multiprocessing.dummy import Pool | |
from sklearn.cluster import KMeans | |
import functools | |
... | |
pool = Pool() | |
results = pool.map(functools.partial(find_cluster, kmeans=kmeans, X=X), clusters) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
git diff -- . ':(exclude)*.ipynb' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
python3 -m http.server |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Method 1: Using Docker file | |
EXPOSE 5000-9999 | |
Method 2: Using Run commands | |
docker run –expose=5000-9999 | |
or | |
docker run -p 5000-9999:5000-9999 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
reference: https://stackoverflow.com/questions/879432/what-is-the-difference-between-a-generative-and-discriminative-algorithm (by benhamner) | |
Let's say you have input data x and you want to classify the data into labels y. A generative model learns the joint probability distribution p(x,y) and a discriminative model learns the conditional probability distribution p(y|x) - which you should read as "the probability of y given x". | |
Here's a really simple example. Suppose you have the following data in the form (x,y): | |
(1,0), (1,0), (2,0), (2, 1) | |
p(x,y) is |