This file contains hidden or 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
| # Register the Ubuntu Nvidia PPA | |
| add-apt-repository ppa:graphics-driver/ppa | |
| apt update | |
| ubuntu-drivers autoinstall | |
| # Restart the machine | |
| reboot | |
| # Then, once rebooted... | |
| # Install the latest toolkit |
This file contains hidden or 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 statistics import mean | |
| from math import sqrt | |
| from functools import reduce | |
| from sentence_transformers import SentenceTransformer | |
| import numpy as np | |
| from scipy.spatial.distance import cosine | |
| model = SentenceTransformer("distilbert-base-nli-stsb-mean-tokens") |
This file contains hidden or 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 io | |
| import typing as t | |
| import pickle | |
| import os | |
| import numpy as np | |
| from tqdm import tqdm | |
| from sklearn.neighbors import BallTree | |
| # The embedded word vectors that work with this gist can be downloaded at |
This file contains hidden or 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
| ### VISUAL TERMINAL SETTINGS | |
| ############################ | |
| # Configure prompt | |
| EMOJIS=("๐ฎ" "๐" "๐" "๐") | |
| DEFAULT_EMOJI=${EMOJIS[$RANDOM % ${#EMOJIS[@]} ]} | |
| parse_git_branch() { | |
| git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/ (\1)/' |
NewerOlder