Skip to content

Instantly share code, notes, and snippets.

@braingineer
braingineer / git+clone+ssh+agent+forward+sudo
Created November 13, 2017 21:09 — forked from scottjacobsen/git+clone+ssh+agent+forward+sudo
Git clone using ssh agent forwarding and sudo
SSH agent forwarding is great. It allows you to ssh from one server to
another all the while using the ssh-agent running on your local
workstation. The benefit is you don't need to generate ssh key pairs
on the servers you are connecting to in order to hop around.
When you ssh to a remote machine the remote machine talks to your
local ssh-agent through the socket referenced by the SSH_AUTH_SOCK
environment variable.
So you the remote server you can do something like:
@braingineer
braingineer / tmux-cheatsheet.markdown
Created October 18, 2017 18:58 — forked from MohamedAlaa/tmux-cheatsheet.markdown
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@braingineer
braingineer / 09242017-registering-hooks.ipynb
Last active September 25, 2017 17:14 — forked from anonymous/09242017-registering-hooks.ipynb
registering hooks in pytorch
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@braingineer
braingineer / matprint.py
Created March 8, 2017 01:31 — forked from lbn/matprint.py
Pretty print a matrix in Python 3 with numpy
def matprint(mat, fmt="g"):
col_maxes = [max([len(("{:"+fmt+"}").format(x)) for x in col]) for col in mat.T]
for x in mat:
for i, y in enumerate(x):
print(("{:"+str(col_maxes[i])+fmt+"}").format(y), end=" ")
print("")
# Try it!
import numpy as np
@braingineer
braingineer / fnc.ipynb
Created February 1, 2017 19:29 — forked from anonymous/fnc.ipynb
FNC1 - Data Handling Resources
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@braingineer
braingineer / latin_squares_experimental_design.ipynb
Created January 12, 2017 18:14 — forked from anonymous/latin_squares_experimental_design.ipynb
Latin Squares Experimental Design Generator
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@braingineer
braingineer / pokemon go analysis.ipynb
Last active February 6, 2018 10:42 — forked from anonymous/pokemon go analysis.ipynb
pokemon go data analysis
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.