Skip to content

Instantly share code, notes, and snippets.

View mihaibujanca's full-sized avatar
👁️
51:9 Cast me not off in the time of execution of a sequential instruction stream

Mihai Bujanca mihaibujanca

👁️
51:9 Cast me not off in the time of execution of a sequential instruction stream
  • University of Manchester
  • Manchester, UK
View GitHub Profile
@ialhashim
ialhashim / fill_depth_colorization.py
Last active May 27, 2024 21:23
Python implementation of depth filling from NYU Depth v2 toolbox
# Original Matlab code https://cs.nyu.edu/~silberman/datasets/nyu_depth_v2.html
#
#
# Python port of depth filling code from NYU toolbox
# Speed needs to be improved
#
# Uses 'pypardiso' solver
#
import scipy
import skimage
@kendricktan
kendricktan / capsule_networks.py
Last active August 17, 2021 17:12
Clean Code for Capsule Networks
"""
Dynamic Routing Between Capsules
https://arxiv.org/abs/1710.09829
"""
import torch
import torch.nn as nn
import torch.optim as optim
import torch.nn.functional as F
import torchvision.transforms as transforms
@nifl
nifl / grok_vi.mdown
Created August 29, 2011 17:23
Your problem with Vim is that you don't grok vi.

Answer by Jim Dennis on Stack Overflow question http://stackoverflow.com/questions/1218390/what-is-your-most-productive-shortcut-with-vim/1220118#1220118

Your problem with Vim is that you don't grok vi.

You mention cutting with yy and complain that you almost never want to cut whole lines. In fact programmers, editing source code, very often want to work on whole lines, ranges of lines and blocks of code. However, yy is only one of many way to yank text into the anonymous copy buffer (or "register" as it's called in vi).

The "Zen" of vi is that you're speaking a language. The initial y is a verb. The statement yy is a simple statement which is, essentially, an abbreviation for 0 y$:

0 go to the beginning of this line. y yank from here (up to where?)