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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<title>Your Awesome Website</title> | |
<style> | |
#mainFrame { | |
background-color: black; |
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
#~/.ssh/config | |
_____________________________________________________________________________ | |
# Instructions: | |
# --------------------------------------------- | |
# the way this works is that you have to use the Host value with the ssh call | |
# Host="github.com-paulegradie" | |
# git clone git@${Host}:paulegradie/SeqPyPlot.git | |
# The default here is github.com - this is what comes with the copy/paste from github when you click | |
# the clone or download button. |
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
# assigns the row from the embedding matrix to the named variable | |
king = embed_matrix[word_to_index['king']] | |
male = embed_matrix[word_to_index[‘male’]] | |
female = embed_matrix[word_to_index[‘female']] | |
queen = embed_matrix[word_to_index['queen']] | |
# the formula now uses the vectors from the embedding matrix | |
assert (king - man) + woman ≈ queen |
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
""" | |
# The map | |
word | idx | |
---------------- | |
king | 0 | |
male | 1 | |
queen | 2 | |
female | 3 | |
""" |
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
idx | embed_matrix | |
0 [[ 0.21143426, 1.2885487 , 0.98160927, 0.17858341], | |
1 [-0.38735983, 0.06507064, 1.31839592, -0.91412724], | |
2 [ 1.13726889, 0.48327542, 0.65075236, 0.93818869], | |
3 [1.73606298, 1.70675348, 0.31396571, 2.03089933]] |
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
import numpy as np | |
def make_blob_part(mean, cov, num_points=500): | |
x, y = np.random.multivariate_normal(mean, cov, num_points).T | |
return np.hstack((x.reshape(-1, 1), y.reshape(-1, 1))) | |
mean1 = [-10, 10] | |
mean2 = [-15, 5] | |
mean3 = [-9, 3] |
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 {old_branch}...{new_branch} --name-status --diff-filter=A | |
e.g. to find a enw file added since branching from master: | |
git diff master...gradie/sandbox --name-status --diff-filter=A | |
Options for `--diff-filter | |
Added (A) | |
Copied (C) |
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 fetch --all | |
git reset --hard origin/{branch_name} |