Use these commands to run a jupyter server on a remote server and access it locally in a browser. You must have SSH access to the browser. Use any port you want.
Do not forget to change username@server
to the correct value!
where | using | command |
---|
#!/bin/bash | |
function usage() { | |
echo "usage: $0 <dir>" | |
} | |
if [[ $# -ne 1 ]] || [[ -z $1 ]]; then | |
usage | |
exit -1 | |
fi |
#!/bin/bash | |
function usage() { | |
echo "usage: $0 <dir>" | |
} | |
if [[ $# -ne 1 ]] || [[ -z $1 ]]; then | |
usage | |
exit -1 | |
fi |
if [[ ! -d ./.venv ]]; then | |
echo "no virtual environment in current directory" | |
exit 1 | |
fi | |
. .venv/bin/activate | |
PYVER=`python --version | cut -d " " -f2` | |
DNAME="[${PYVER}]: ${PWD}" | |
KNAME=${PWD##*/} |
#!/bin/bash | |
echo "" | |
echo -e "running : screen -ls " | |
echo -e "start : screen -d -m -S NAME command" | |
echo -e "stop : screen -X -S NAME quit " | |
echo -e "attach : screen -r NAME " | |
if [[ $# -gt 0 ]]; then | |
echo "" | |
echo -e "screen $*" |
#!/bin/bash | |
CAT=mdcat | |
function head() { | |
echo "---" | $CAT | |
echo "# $1" | |
echo "" | |
} |
#!/usr/bin/env bash | |
DEFAULT_MACOS_OPEN="open" | |
DEFAULT_LINUX_OPEN="gvfs-open" | |
if ! [ -x "$(command -v ${DEFAULT_LINUX_OPEN})" ]; then | |
DEFAULT_LINUX_OPEN="browse" | |
fi | |
declare -A OPEN_MACOS |
def create_subplots(n_row, n_col, cell_w=5.0, cell_h=5.0, sep_w=1.0, sep_v=1.0, | |
ls=1.0, rs=1.0, ts=1.0, bs=1.0): | |
""" | |
Create subplot grid using absolute widths. | |
Parameters: | |
n_row (int): rows in subplot grid | |
n_col (int): columns in subplot grid | |
cell_w (float): width of each cell | |
cell_h (float): height of each cell |
\makeatletter | |
\DeclareDocumentCommand{\setvalue}{m o m}{% | |
\IfNoValueTF{#2}{% | |
% NO INDEX | |
\expandafter\DeclareDocumentCommand\csname @#1\endcsname{}{#3}% | |
}{% | |
% INDEX | |
\expandafter\DeclareDocumentCommand\csname @#1@#2\endcsname{}{#3}% | |
}% | |
}% |
# create | |
tar -cvf output.tar input/* | |
gzip output.tar | |
# The name of the tar, "output.tar", does not matter. | |
# When extracted, the files will expand into a directory named "input". | |
# extract | |
tar -xvf output.tar |