git clone git@github.com:YOUR-USERNAME/YOUR-FORKED-REPO.git
cd into/cloned/fork-repo
git remote add upstream git://github.com/ORIGINAL-DEV-USERNAME/REPO-YOU-FORKED-FROM.git
git fetch upstream
from itertools import chain | |
def parse_range(rng): | |
parts = rng.split('-') | |
if 1 > len(parts) > 2: | |
raise ValueError("Bad range: '%s'" % (rng,)) | |
parts = [int(i) for i in parts] | |
start = parts[0] | |
end = start if len(parts) == 1 else parts[1] | |
if start > end: |
openssl rsa -in ~/.ssh/id_rsa -outform pem > id_rsa.pem | |
chmod 600 id_rsa.pem |
N.B. SQLAlchemy now incorporates all of this information in its documentation; I’m leaving this post here, but recommend referring to SQLAlchemy instead of these instructions.
pip
or conda
, for example:#!/bin/bash | |
### | |
### my-script — does one thing well | |
### | |
### Usage: | |
### my-script <input> <output> | |
### | |
### Options: | |
### <input> Input file to read. | |
### <output> Output file to write. Use '-' for stdout. |
set -x AWS_PROFILE default # replace | |
set -x AWS_REGION us-east-1 # replace | |
set -x CODEARTIFACT_DOMAIN foo # replace | |
set -x CODEARTIFACT_DOMAIN_ID 123456789 # replace | |
set -x CODEARTIFACT_REPOSITORY somepypi # replace | |
function codeartifact_login | |
set -Ux CODEARTIFACT_TOKEN (aws --profile $AWS_PROFILE codeartifact get-authorization-token --domain $CODEARTIFACT_DOMAIN --domain-owner $CODEARTIFACT_DOMAIN_ID --query authorizationToken --output text) | |
set -Ux PIPENV_PYPI_MIRROR "https://aws:$CODEARTIFACT_TOKEN@$CODEARTIFACT_DOMAIN-$CODEARTIFACT_DOMAIN_ID.d.codeartifact.$AWS_REGION.amazonaws.com/pypi/$CODEARTIFACT_REPOSITORY/simple/" | |
end |
Steps grabbed from: https://stackoverflow.com/a/47296960
Inside of your target venv workspace:
pipenv install ipykernel
pipenv run python -m ipykernel install --user --name=<name-of-pipenv-venv>