Skip to content

Instantly share code, notes, and snippets.

@colspan
colspan / Dockerfile.second-pytorch
Last active July 25, 2020 02:32
Dockerfile for PointPillars implementation
# Based on https://github.com/ufoym/deepo/blob/master/docker/Dockerfile.pytorch-py36-cu101
FROM nvidia/cuda:10.1-cudnn7-devel-ubuntu18.04
ENV LANG C.UTF-8
RUN APT_INSTALL="apt-get install -y --no-install-recommends" && \
PIP_INSTALL="python -m pip --no-cache-dir install --upgrade" && \
GIT_CLONE="git clone --depth 10" && \
rm -rf /var/lib/apt/lists/* \
/etc/apt/sources.list.d/cuda.list \
FROM ubuntu:18.04
ENV HOME /opt/3dsmoothnet
ENV DEBIAN_FRONTEND noninteractive
RUN apt-get update && apt-get install -y sudo apt-utils
# Clone latest PCL
RUN apt-get update && apt-get install -y git
# Install prerequisites
#!/bin/sh
# https://www.johnvansickle.com/ffmpeg/
# http://looooooooop.blog35.fc2.com/blog-entry-1108.html
ffmpeg_path=ffmpeg-3.4-64bit-static/
infile=$1
resultfile=${infile}_transforms.trf
twopassfile=${infile}_2pass.mbtree
outfile=${infile}_stab.mp4
${ffmpeg_path}ffmpeg -i $infile -vf vidstabdetect=result=${resultfile}:shakiness=5:accuracy=9:stepsize=6:mincontrast=0.25:tripod=0:show=0 -vcodec libx264 -b:v 4200k -pass 1 -passlogfile ${twopassfile} -an -f null -
${ffmpeg_path}ffmpeg -i $infile -vf vidstabtransform=input=${resultfile}:smoothing=10:maxshift=-1:maxangle=-1:crop=keep:invert=0:relative=1:zoom=0:optalgo=avg -vcodec libx264 -b:v 4200k -pass 2 -passlogfile ${twopassfile} -acodec aac -y ${outfile}
@colspan
colspan / Dockerfile
Last active March 7, 2021 13:53
Dockerfile for ROCm based Cupy and Chainer
FROM rocm/rocm-terminal
LABEL maintainer "Kunihiko Miyoshi <miyoshik@preferred.jp>"
LABEL OBJECT="ROCm based CUPY Environment"
## MEMO rocm-dkms package must be installed on host
RUN sudo apt-get update && sudo apt-get install -y \
wget software-properties-common \
hipblas hipsparse rocrand
@colspan
colspan / gomify.js
Created February 18, 2018 05:35
gomify : gomi notifier with Google Home
const googlehome = require("google-home-notifier")
const dayDef = "日月火水木金土".split("")
function notify() {
const dt = new Date()
const weekCount = Math.ceil(dt.getDate() / 7)
let gomiText = ""
const noGomi = "今日はゴミを捨てる日ではありません。"
@colspan
colspan / cvae_net.py
Created December 10, 2017 02:24
Chainer Implementation of Convolutional Variational AutoEncoder
#!/usr/bin/env python
"""
Copyright Kunihiko Miyoshi, Preferred Networks Inc.
MIT License
Reference
https://github.com/pfnet/chainer/blob/master/examples/vae/net.py
https://github.com/crcrpar/chainer-VAE
https://github.com/mlosch/CVAE-Torch/blob/master/CVAE.lua
"""
@colspan
colspan / file0.txt
Last active December 19, 2016 04:55
データフロー制御フレームワークLuigiを使ってビッグデータ解析をする ref: http://qiita.com/colspan/items/453aeec7f4f420b91241
sudo pip install luigi