Skip to content

Instantly share code, notes, and snippets.

View emilemathieu's full-sized avatar

Mathieue emilemathieu

View GitHub Profile
@sbarratt
sbarratt / torch_jacobian.py
Created May 9, 2019 19:40
Get the jacobian of a vector-valued function that takes batch inputs, in pytorch.
def get_jacobian(net, x, noutputs):
x = x.squeeze()
n = x.size()[0]
x = x.repeat(noutputs, 1)
x.requires_grad_(True)
y = net(x)
y.backward(torch.eye(noutputs))
return x.grad.data
@Miliox
Miliox / Makefile
Created November 8, 2012 00:36
Makefile to compile pdflatex with bibtex
# Author: Emiliano Carlos de Moraes Firmino @ 10/2012
SHELL=/bin/sh
THESIS=thesis
.SUFFIXES:
.SUFFIXES: .bib .pdf .tex
.PHONY: clean
run: $(THESIS).pdf
@MohamedAlaa
MohamedAlaa / tmux-cheatsheet.markdown
Last active May 1, 2024 03:34
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@spicycode
spicycode / tmux.conf
Created September 20, 2011 16:43
The best and greatest tmux.conf ever
# 0 is too far from ` ;)
set -g base-index 1
# Automatically set window title
set-window-option -g automatic-rename on
set-option -g set-titles on
#set -g default-terminal screen-256color
set -g status-keys vi
set -g history-limit 10000