Skip to content

Instantly share code, notes, and snippets.

Adam Gagorik AdamGagorik

  • United States
View GitHub Profile
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.
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
AdamGagorik /
Last active May 21, 2020
Remote Jupyter Notebook


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
View CreateDocumentParameter.tex
\DeclareDocumentCommand{\setvalue}{m o m}{%
\expandafter\DeclareDocumentCommand\csname @#1\endcsname{}{#3}%
\expandafter\DeclareDocumentCommand\csname @#1@#2\endcsname{}{#3}%
AdamGagorik / tar
Last active Sep 17, 2015
Create and extract tar archives
View tar
# 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
AdamGagorik / stub
Last active Sep 17, 2015
Extract stub from file name in bash.
View stub
AdamGagorik / ext
Last active Sep 17, 2015
Extract extension from file name in bash.
View ext
AdamGagorik / gs-reprint
Last active Sep 17, 2015
Make PDF smaller
View gs-reprint
gs -sDEVICE=pdfwrite -sPAPERSIZE=letter -dFIXEDMEDIA -dPDFFitPage -dCompatibilityLevel=1.4 -o out.pdf in.pdf
You can’t perform that action at this time.