sudo ldconfig /usr/local/cuda-7.5/lib64
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
set nocompatible " be iMproved, required | |
filetype off " required | |
" set the runtime path to include Vundle and initialize | |
set rtp+=~/.vim/bundle/Vundle.vim | |
call vundle#begin() | |
" alternatively, pass a path where Vundle should install plugins | |
"call vundle#begin('~/some/path/here') | |
" let Vundle manage Vundle, required |
Assuming numpy, scipy, & Theano are already installed. Make sure you install:
sudo apt-get install libhdf5-dev/
So that the headers can be discovered. Then we install h5py:
sudo pip install h5py
This is straightforward to do with ffmpeg:
ffmpeg -y -r 1000 -i "myfile.mp4" -sameq "image.%06d.jpg"
To convert h.264
format to mp4, install the following utility:
sudo apt-get install gpac
And then,
MP4Box -add filename.h264 filename.mp4
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# To run this command (copied from user tianhuil): | |
# curl https://gist.githubusercontent.com/tianhuil/0aa9b265f55413dc7198/raw > setup_digitalocean.sh | |
# . setup_digitalocean.sh | |
# Update sudo apt-get | |
sudo apt-get update | |
# Installing scientific Python | |
sudo apt-get -y install --fix-missing build-essential python-dev python-numpy python-setuptools python-scipy libatlas-dev | |
sudo apt-get -y install --fix-missing build-essential python-sklearn |
Install the usual scientific packages like so:
sudo port install py27-numpy py27-scipy py27-matplotlib py27-ipython +notebook py27-pandas py27-sympy py27-nose
Now ensure that the relevant versions are active:
sudo port select --set python python27
Given an object in Python, we can iterate over its attributes (much as we might iterate over keys in a dictionary) by using the following method. In this example, we convert an object into a list of the attribute contents of the object.
[data.__dict__[key] for key in data.__dict__.iterkeys()]
So, given a class,
class Example():
If you would like to autoreload changed modules in python, this'll do it:
%load_ext autoreload
%autoreload 2