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
Host your_short_name | |
User name_of_user | |
HostName xx.xx.xx.xx | |
IdentityFile ~/.ssh/name_of_your_private_ssh_key | |
LocalForward xxxx 127.0.0.1:xxxx |
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
# install docker | |
sudo apt update | |
sudo apt -y install apt-transport-https ca-certificates curl software-properties-common | |
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add - | |
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu focal stable" | |
sudo apt update | |
apt-cache policy docker-ce | |
sudo apt -y install docker-ce | |
sudo chmod 666 /var/run/docker.sock | |
docker ps |
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
%load_ext autoreload | |
%autoreload 2 |
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 IPython.core.display import display, HTML | |
display(HTML('<h1>Hello, world!</h1>')) |
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 gspread | |
import pandas as pd | |
from oauth2client.service_account import ServiceAccountCredentials | |
creds = ServiceAccountCredentials.from_json_keyfile_name( | |
filename="credentials.json", | |
scopes=["https://www.googleapis.com/auth/drive"] | |
) | |
# Initialize client |
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
INSTANCE_ID="i-xxx" | |
PORT=22 | |
SG_ID=`aws ec2 describe-instance-attribute --instance-id $INSTANCE_ID --attribute groupSet | python -c "import sys, json; print(json.load(sys.stdin)['Groups'][0]['GroupId'])"` | |
CURRENT_IP=`curl -s http://whatismyip.akamai.com/` | |
aws ec2 authorize-security-group-ingress --group-id $SG_ID --protocol tcp --port $PORT --cidr $CURRENT_IP/32 |