Skip to content

Instantly share code, notes, and snippets.

View dichotomies's full-sized avatar

Vadim Tschernezki dichotomies

  • University of Oxford
  • United Kingdom
View GitHub Profile
@dichotomies
dichotomies / ubuntu-keyboard.md
Last active May 31, 2017 09:40
ubuntu-keyboard

Reset xmodmap Keyboard

setxkbmap -layout us

Swap Caps_Lock and Control_L

@dichotomies
dichotomies / LC_COLORS.md
Created March 6, 2018 17:14 — forked from magicznyleszek/LC_COLORS.md
LSCOLORS & LS_COLORS

alternatively use: http://geoff.greer.fm/lscolors/

LSCOLORS

The value of this variable describes what color to use for which attribute when colors are enabled with CLICOLOR. This string is a concatenation of pairs of the format fb, where f is the foreground color and b is the background color.

The color designators are as follows:

a black

@dichotomies
dichotomies / proxynca-cars.log
Created January 17, 2019 19:31
cars log for istvan
NOTE: "nb_classes" is set automatically now in training; hence, ignore it as parameter.
2019-01-17 12:43:53,439 Training parameters: {'dataset': 'cars', 'sz_embedding': 64, 'nb_classes': 100, 'sz_batch': 32, 'lr_embedding': 1e-05, 'lr_inception': 0.001, 'lr_proxynca': 0.001, 'weight_decay': 0.0005, 'epsilon': 0.01, 'gamma': 0.1, 'nb_epochs': 20, 'log_filename': 'cars-scalenorm', 'gpu_id': 1, 'nb_workers': 16}
2019-01-17 12:43:53,440 Training for 20 epochs.
2019-01-17 12:43:53,440 **Evaluating initial model...**
2019-01-17 12:44:26,258 NMI: 33.773
2019-01-17 12:44:31,517 R@1 : 28.754
2019-01-17 12:44:31,729 R@2 : 39.208
2019-01-17 12:44:31,937 R@4 : 51.273
@dichotomies
dichotomies / proxynca-cars-default.log
Created January 18, 2019 23:41
cars log, default conf (like in repo)
2019-01-18 19:40:32,659 Training parameters: {'dataset': 'cars', 'config': 'config_default.json', 'sz_embedding': 64, 'sz_batch': 32, 'nb_epochs': 50, 'log_filename': 'default-config', 'gpu_id': 3, 'nb_workers': 16}
2019-01-18 19:40:32,659 Training for 50 epochs.
2019-01-18 19:40:32,660 **Evaluating initial model...**
2019-01-18 19:41:29,950 NMI: 33.707
2019-01-18 19:41:36,078 R@1 : 27.315
2019-01-18 19:41:36,360 R@2 : 37.769
2019-01-18 19:41:36,629 R@4 : 50.203
2019-01-18 19:41:36,862 R@8 : 63.707
2019-01-18 19:42:32,918 Epoch: 0, loss: 4.153, time (seconds): 56.05.
2019-01-18 19:42:32,919 **Evaluating...**
@dichotomies
dichotomies / cars.py
Created January 18, 2019 23:45
cars parsing
from .base import *
import scipy.io
class Cars(BaseDataset):
def __init__(self, root, classes, transform = None):
BaseDataset.__init__(self, root, classes, transform)
annos_fn = 'cars_annos.mat'
cars = scipy.io.loadmat(os.path.join(root, annos_fn))
ys = [int(a[5][0] - 1) for a in cars['annotations'][0]]

ZSH CheatSheet

This is a cheat sheet for how to perform various actions to ZSH, which can be tricky to find on the web as the syntax is not intuitive and it is generally not very well-documented.

Strings

Description Syntax
Get the length of a string ${#VARNAME}
Get a single character ${VARNAME[index]}