start new:
tmux
start new with session name:
tmux new -s myname
# Instructions for 4.14 and cuda 9.1 | |
# If upgrading from 4.13 and cuda 9.0 | |
$ sudo apt-get purge --auto-remove libcud* | |
$ sudo apt-get purge --auto-remove cuda* | |
$ sudo apt-get purge --auto-remove nvidia* | |
# also remove the container directory direcotory at /usr/local/cuda-9.0/ | |
# Important libs required with 4.14.x with Cuda 9.X | |
$ sudo apt install libelf1 libelf-dev |
import tensorflow as tf | |
import numpy as np | |
def smoothed_metric_loss(input_tensor, name='smoothed_triplet_loss', margin=1): | |
''' | |
input_tensor: require a tensor with predefined dimensions (No None dimension) | |
Every two consecutive vectors must be a positive pair. There | |
should not be more than one pair from each class. | |
''' | |
with tf.variable_scope(name): |
Open $ vim /etc/default/grub
then add elevator=noop
next to GRUB_CMDLINE_LINUX_DEFAULT
. Run $ update-grub
and $ cat /sys/block/sda/queue/scheduler
to be sure that noop is being used:
$ vim /etc/default/grub
$ update-grub
$ cat /sys/block/sda/queue/scheduler
[noop] deadline cfq
""" | |
Sublime shortcuts for jupyter notebook | |
""" | |
from jupyter_core.paths import jupyter_config_dir | |
import os | |
custom_js_path = os.path.join(jupyter_config_dir(), 'custom', 'custom.js') | |
custom_path = os.path.join(jupyter_config_dir(), 'custom') | |
#!/usr/bin/env python | |
""" | |
This tool simplifies a LaTeX project by removing unused files and removing comments. | |
It also merges tex files into a single file and optionally crops and downscales images | |
to reduce the size of the output. It is useful when you want to prepare an ArXiv submission. | |
Usage: | |
export-latex.py <path> <output> [options] | |
Arguments: |