Skip to content

Instantly share code, notes, and snippets.

View glass5er's full-sized avatar

Kentaro Doba glass5er

  • Nakano, Tokyo
View GitHub Profile
# install dependencies
sudo apt-get update
sudo apt-get install -y build-essential
sudo apt-get install -y cmake
sudo apt-get install -y libgtk2.0-dev
sudo apt-get install -y pkg-config
sudo apt-get install -y python-numpy python-dev
sudo apt-get install -y libavcodec-dev libavformat-dev libswscale-dev
sudo apt-get install -y libjpeg-dev libpng-dev libtiff-dev libjasper-dev
<前置き>
http://nlab.itmedia.co.jp/nl/articles/1507/03/news099.html
にあるように,有料サイト http://dorcel-handsoff.com/ の動画は
QSPLキーを同時に押さなければ閲覧ができないが,
これらのキーが押されている状態を自動生成することで,ハンズフリーでの閲覧が可能になる.
<手順>
1. Linux PC を用意する
@glass5er
glass5er / wxVTK-patch.md
Last active August 29, 2015 14:13
wxPython + vtk renderer problems

wxPython + vtk renderer problems

Preliminaries

  • Ubuntu 14.04 LTS
  • Anaconda 3.7.4 with python 2.7
  • wxpython 3.0.0
  • vtk 5.10.1

Problems

@glass5er
glass5er / pptximage.py
Last active May 25, 2023 13:08
add an image in every Powerpoint slide using python-pptx
##
## Copy & Paste Tool for images to PowerPoint(.pptx)
##
import pptx
import pptx.util
import glob
import scipy.misc
OUTPUT_TAG = "MY_TAG"
@glass5er
glass5er / singleton-inheritance.cpp
Last active November 14, 2018 11:16
When you create a subclass of singleton, use template.
#include <iostream>
#include <string>
using namespace std;
//----------------
template <class U>
class SingletonParent
{
@glass5er
glass5er / stringize-macro-arg.cpp
Created June 19, 2013 07:11
to stringize arguments in macro, just prepend '#'
#include <iostream>
#include <string>
using namespace std;
//-- to stringize arguments in macro, just prepend '#'
#define SET_STR(name,x) string name(#name); cout << name << " = " << x << endl;
int main(int argc, char const* argv[])
{
@glass5er
glass5er / fizzbuzz.rb
Created May 21, 2013 16:18
FizzBuzz practice in Ruby
#!/usr/bin/env ruby
def fizzbuzz(n)
(n % 15 == 0) ? "FizzBuzz" :
(n % 5 == 0) ? "Buzz" :
(n % 3 == 0) ? "Fizz" :
n
end
50.times {|i|