start new:
tmux
start new with session name:
tmux new -s myname
adb shell pm list packages -f |
pip freeze --local | grep -v '^\-e' | cut -d = -f 1 | xargs pip install -U |
##VGG16 model for Keras
This is the Keras model of the 16-layer network used by the VGG team in the ILSVRC-2014 competition.
It has been obtained by directly converting the Caffe model provived by the authors.
Details about the network architecture can be found in the following arXiv paper:
Very Deep Convolutional Networks for Large-Scale Image Recognition
K. Simonyan, A. Zisserman
# Create a function to reshape a ndarray using a sliding window. | |
# NOTE: The function uses numpy's internat as_strided function because looping in python is slow in comparison. | |
# Adopted from http://www.rigtorp.se/2011/01/01/rolling-statistics-numpy.html | |
import numpy as np | |
# Reshape a numpy array 'a' of shape (n, x) to form shape((n - window_size), window_size, x)) | |
def rolling_window(a, window, step_size): | |
shape = a.shape[:-1] + (a.shape[-1] - window + 1 - step_size + 1, window) | |
strides = a.strides + (a.strides[-1] * step_size,) |
""" | |
Hierarchial Clustering. | |
The goal of gist is to show to use scikit-learn to perform agglomerative clustering when: | |
1. There is a need for a custom distance metric (like levenshtein distance) | |
2. Use the distance in sklearn's API. | |
Adapted from: sklearn's FAQ. | |
http://scikit-learn.org/stable/faq.html | |
""" |
find . -type f -exec rename 's/<original string>/<string to be replaced with>/g' {} + |