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 sklearn.feature_extraction.text import TfidfVectorizer | |
tf = TfidfVectorizer(analyzer='word',ngram_range=(1, 2),min_df=0, stop_words='english') | |
tfidf_matrix = tf.fit_transform(movies['genres']) | |
from sklearn.metrics.pairwise import linear_kernel | |
cosine_sim = linear_kernel(tfidf_matrix, tfidf_matrix) | |
# Build a 1-dimensional array with movie titles | |
titles = movies['title'] |
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
#!/bin/sh | |
reponame="$1" | |
if [ "$reponame" = "" ]; then | |
read -p "Enter Github Repository Name: " reponame | |
fi | |
mkdir ./$reponame | |
cd $reponame | |
curl -u USERNAME https://api.github.com/user/repos -d "{\"name\":\"$reponame\"}" | |
git init | |
echo "ADD README CONTENT" > README.md |
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
# Set the width and height of the plot | |
f, ax = plt.subplots(figsize=(10, 10)) | |
# Generate correlation matrix | |
corr_matrix = data.corr() | |
# Plot using seaborn library | |
sns.heatmap(corr_matrix, mask=np.zeros_like(corr_matrix,dtype=np.bool), | |
square=True, ax=ax, annot=True) |