sudo add-apt-repository ppa:gnome-terminator
sudo apt-get update
sudo apt-get install terminator
Terminator should be setup as default now. Restart your terminal (shortcut: "Ctrl+Alt+T").
from graphviz import Digraph | |
import re | |
import torch | |
import torch.nn.functional as F | |
from torch.autograd import Variable | |
from torch.autograd import Variable | |
import torchvision.models as models | |
def make_dot(var): |
# 1. Adding a 'count' column to the result of a groupby in pandas? (https://goo.gl/WMr1zJ) | |
df.groupby(['A','B']).size().to_frame('count').reset_index() |
readlink -f $(which java) |
Prereq:
apt-get install zsh
apt-get install git-core
Getting zsh to work in ubuntu is weird, since sh
does not understand the source
command. So, you do this to install zsh
wget https://github.com/robbyrussell/oh-my-zsh/raw/master/tools/install.sh -O - | zsh
sudo apt-get install git build-essential linux-headers-generic libelf-dev dkms | |
git clone https://github.com/neurobin/MT7630E.git | |
cd MT7630E | |
sudo ./install | |
sudo make dkms |
# downgrade automake to 1.11.5 | |
## remove current automake | |
sudo apt-get remove automake | |
sudo apt-get autoremove | |
## install automake 1.11.5 | |
wget https://ftp.gnu.org/gnu/automake/automake-1.11.5.tar.gz | |
tar xf automake-1.12.5.tar.gz | |
cd automake-1.11.5/ | |
./configure --prefix=/usr/local | |
make |
1.Create desktop config file | |
sudo nano /usr/share/applications/smartsvn.desktop | |
2. Put the text below | |
[Desktop Entry] | |
Name=SmartSVN | |
Name[en]=SmartSVN | |
Name[ru]=SmartSVN |
URL without http: [-a-zA-Z0-9@:%._\+~#=]{2,256}\.[a-z]{2,6}\b([-a-zA-Z0-9@:%_\+.~#?&//=]*) | |
URL with http: https?:\/\/(www\.)?[-a-zA-Z0-9@:%._\+~#=]{2,256}\.[a-z]{2,6}\b([-a-zA-Z0-9@:%_\+.~#?&//=]*) |
def words_map(filepaths, start_pos, end_post, word_pos, delim=' '): | |
mapper = {} | |
for filepath in filepaths: | |
with open(filepath, 'r') as f: | |
for row in f: | |
row = row.split(delim) | |
if row[word_pos] not in mapper.keys(): | |
mapper[row[word_pos]] = {} |