Skip to content

Instantly share code, notes, and snippets.

@ronekko
ronekko / opencv_imshow_fullscreen.py
Last active November 18, 2023 16:13
Python example to show an image in full screen by opencv
# -*- coding: utf-8 -*-
"""
Created on Thu Jun 22 16:44:27 2017
@author: sakurai
"""
import numpy as np
import cv2
@ronekko
ronekko / faviconize_google_nested.user.js
Last active February 20, 2021 13:35
faviconize google, fixed for update of google at 2015/07/23
// ==UserScript==
// @name Faviconize Google (nested icons)
// @namespace http://userscripts.ru/js/faviconize-google/
// @description Adds favicons to each link offered by Google search results.
// @include https://www.google.*/search?*
// @include https://encrypted.google.*/search?*
// @include https://www.google.*/webhp*
// @include https://www.google.*/#*
// @include https://groups.google.*/groups/search?*
// @copyright 2009+, Nikita Vasilyev (http://userscripts.org/scripts/show/58177)

SPTKをWindows+MSVC環境にインストールする方法

前提: インストール先をC:\SPTKとする。

  1. 公式サイトからソースコード(例: SPTK-3.8.tar.gz)をダウンロード、任意の場所に展開し、ソースコードのフォルダを開く(例: C:\SPTK-3.8)。
  2. Makefile.makの1行目を編集し、C:\SPTK\binC:\SPTK 変更する(\binを削除する)。あるいは、任意のパスを指定すると、そのフォルダにインストールされる。
  3. Visual Studioの x86 Native Tools コマンドプロンプト管理者権限で起動し、C:\SPTK-3.8 に移動する。x64版ではコンパイルできなかった。
  4. unistd.h が無いため、どこかから拾ってきて C:\SPTK-3.8\include\unistd.h を作成する。例えば、Win7 64bit, MSVS2013なら このリンク先からコピペする のでもコンパイルできた。
  5. 以下のコマンドを、順番に実行し、エラーが出なれけばインストール完了。
nmake /f Makefile.mak
@ronekko
ronekko / google_search_quote_link.user.js
Last active February 29, 2020 08:23
Google Search - "Quote" link
@ronekko
ronekko / .clang-tidy
Created February 15, 2020 11:27
.clang-tidy
Checks: |
-*,
boost-*,
bugprone-*,
cert-*,
cppcoreguidelines-*,
clang-analyzer-*,
google-*,
misc-*,
modernize-*,
@ronekko
ronekko / rotate_image.py
Last active June 22, 2018 07:40
Rotation of images in chainer
# -*- coding: utf-8 -*-
"""
Created on Fri Jun 22 15:40:40 2018
@author: sakurai
"""
import matplotlib.pyplot as plt
import numpy as np
# -*- coding: utf-8 -*-
"""
Created on Thu May 24 17:00:23 2018
@author: sakurai
"""
import numpy as np
import sympy.geometry as sg
@ronekko
ronekko / subscribe_hokuyo_node_via_rosbridge.py
Created October 28, 2016 15:36
A script for Windows to communicate with ROS hokuyo_node over rosbridge.
# -*- coding: utf-8 -*-
"""
Created on Sat Oct 28 22:14:57 2016
@author: sakurai
---------------------------------------
This script is for Windows to communicate with ROS hokuyo_node over rosbridge.
Install rosbridge on the remote machine.
# -*- coding: utf-8 -*-
"""
Created on Mon Aug 10 14:40:04 2015
@author: ryuhei
"""
import numpy as np
from basic_distributions import (
ProbabilityDistribution, Multinomial, Gaussian, Poisson
# -*- coding: utf-8 -*-
"""
Created on Sun Jan 28 18:29:22 2018
@author: ryuhei
"""
import numpy as np
import matplotlib.pyplot as plt