#Install blender as a module with python 3.5 and pyenv
Tested on Ubuntu 14.04.
Follow instructions from here.
Follow instructions from here.
import torch | |
from torch import nn | |
__all__ = ['FCDenseNet', 'fcdensenet_tiny', 'fcdensenet56_nodrop', | |
'fcdensenet56', 'fcdensenet67', 'fcdensenet103', | |
'fcdensenet103_nodrop'] | |
class DenseBlock(nn.Module): |
#!/usr/bin/env python | |
from threading import Thread, Lock | |
import cv2 | |
class WebcamVideoStream : | |
def __init__(self, src = 0, width = 320, height = 240) : | |
self.stream = cv2.VideoCapture(src) | |
self.stream.set(cv2.cv.CV_CAP_PROP_FRAME_WIDTH, width) | |
self.stream.set(cv2.cv.CV_CAP_PROP_FRAME_HEIGHT, height) |
(defun ros::time->string (tm) | |
(format nil "~A~A" (send tm :sec) (send tm :nsec))) | |
(defun save-csv (destination) | |
(with-open-file (f destination :direction :output :if-exists :append) | |
(format f "hoge~%"))) | |
(save-csv #p"./hoge.csv") |
<?php | |
/* | |
you may modify: | |
php: | |
filename | |
file max size | |
buf size | |
how long to wait |
# NOTE: These instructions do not represent a robust, self-troubleshooting install; they | |
# are definitely not suitable for dumping to a giant script and running as one. If you | |
# use them, they should be run one at a time, with an eye out for errors or problems | |
# along the way. | |
# | |
# The #1 issue you are likely to encounter is with Homebrew or Python packages whose | |
# binary components link against system Python. This will result in runtime segfaults, | |
# especially in rviz. If you suspect this is occurring, you can attempt to remove and | |
# reinstall the offending packages, or go for the nuclear option--- empty your Cellar | |
# and site-packages folders and start over with brewed python from the beginning. |
#!/bin/bash | |
# Bash script to install latest version of ffmpeg and its dependencies on Ubuntu 12.04 or 14.04 | |
# Inspired from https://gist.github.com/faleev/3435377 | |
# Remove any existing packages: | |
sudo apt-get -y remove ffmpeg x264 libav-tools libvpx-dev libx264-dev | |
# Get the dependencies (Ubuntu Server or headless users): | |
sudo apt-get update |
sudo apt-get remove --purge vim vim-runtime vim-gnome vim-tiny vim-common vim-gui-common | |
sudo apt-get build-dep vim-gnome | |
sudo apt-get install liblua5.1-dev luajit libluajit-5.1 python-dev ruby-dev libperl-dev libncurses5-dev libgnome2-dev libgnomeui-dev libgtk2.0-dev libatk1.0-dev libbonoboui2-dev libcairo2-dev libx11-dev libxpm-dev libxt-dev | |
sudo rm -rf /usr/local/share/vim | |
sudo rm /usr/bin/vim | |
#!/bin/bash | |
# | |
# git-mv-with-history -- move/rename file or folder, with history. | |
# | |
# Moving a file in git doesn't track history, so the purpose of this | |
# utility is best explained from the kernel wiki: | |
# | |
# Git has a rename command git mv, but that is just for convenience. | |
# The effect is indistinguishable from removing the file and adding another | |
# with different name and the same content. |
sudo apt-get install liblua5.1-dev | |
sudo mkdir /usr/include/lua5.1/include/ | |
sudo cp /usr/include/lua5.1/* /usr/include/lua5.1/include/ | |
sudo ln -s /usr/lib/x86_64-linux-gnu/liblua5.1.so /usr/local/lib/liblua.so | |
hg clone https://code.google.com/p/vim/ | |
cd vim | |
./configure --with-features=huge \ | |
--enable-perlinterp \ | |
--enable-rubyinterp \ | |
--enable-pythoninterp=yes \ |