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
function git_history() { | |
local filename=$1 | |
local search_string=$2 | |
local lines=$3 | |
local delay=$4 | |
for commit in $(git rev-list HEAD -- "$filename" | tail -r); do | |
clear | |
echo "Commit: $commit, Author: $(git log -1 --pretty=format:'%an' --date=format:'%d-%m-%Y' $commit), Date: $(git log -1 --pretty=format:'%ad' --date=format:'%d-%m-%Y' $commit)" | |
git show $commit:"$filename" | grep -n -A "$lines" -B "$lines" "$search_string" | awk '/--/ && !f{printf "\033[1;34m"; for(i=0;i<70;i++)printf "-"; printf "\033[0m\n"; f=1; next} /--/{f=0} 1' |
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 torch | |
import networkx as nx | |
def adjacency_statistics(adjacency_matrix): | |
""" | |
Compute canonical measures of a graph represented by an adjacency matrix. | |
Args: | |
- adjacency_matrix: PyTorch tensor representing the adjacency matrix of the graph |
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 variables here | |
DIR="$HOME/Code/throwaway/pytorch-geometric-developer-install" | |
PYTHON_VERSION=3.11 | |
RECENT_TORCH_VERSION=2.2.0 | |
GITHUB_USERNAME="project-delphi" | |
MIN_MACOSX_DEPLOYMENT_TARGET=$(sw_vers -productVersion) | |
# install miniconda for apple silicon, if not already installed | |
if [ ! -d "$HOME/anaconda3" ] && [ ! -d "$HOME/miniconda3" ] | |
then |
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 variables here | |
DIR="$HOME/Code/throwaway/pytorch-geometric-user-install" | |
PYTHON_VERSION=3.11 | |
RECENT_TORCH_VERSION=2.2.0 | |
# install miniconda for apple silicon, if not already installed | |
if [ -d "$HOME/anaconda3" ] || [ -d "$HOME/miniconda3" ] | |
then | |
echo "Conda is installed" | |
else |
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
SHELL := /bin/bash | |
.PHONY: venv | |
venv: | |
python3 -m venv .venv &&\ | |
source ./.venv/bin/activate | |
.PHONY: install | |
install: | |
pip install --upgrade pip &&\ |