Skip to content

Instantly share code, notes, and snippets.

View kidapu's full-sized avatar
:octocat:
On vacation

kidapu kidapu

:octocat:
On vacation
  • 14:54 (UTC +09:00)
View GitHub Profile
@satoruhiga
satoruhiga / Spherical coordinate
Created September 25, 2012 11:42
cartesianToSpherical / sphericalToCartesian
ofVec3f cartesianToSpherical(const ofVec3f &v)
{
float r = v.length();
float s = acos(v.z / r);
float f = atan2(v.y, v.x);
return ofVec3f(r, s, f);
}
ofVec3f sphericalToCartesian(const ofVec3f &v)
{
@atinfinity
atinfinity / build_framework.py
Last active November 4, 2015 10:05
OpenCV 3.0-beta Mac OS X向けframeworkビルド用スクリプト(Mac OS X/Xcode/x86_64)
#!/usr/bin/env python
"""
The script builds OpenCV.framework for iOS.
The built framework is universal, it can be used to build app and run it on either iOS simulator or real device.
Usage:
./build_framework.py <outputdir>
By cmake conventions (and especially if you work with OpenCV repository),
the output dir should not be a subdirectory of OpenCV source tree.
@satoruhiga
satoruhiga / ofxAutoSaveParam.h
Last active April 3, 2016 14:59
ofxAutoSaveParam.h
#pragma once
/*
USAGE:
ofxAutoSaveParam param;
class ofApp {
public:
@chimanaco
chimanaco / of_frequent_code
Last active May 15, 2016 11:33
oF to edit later
/* -------------------------------
DEBUG
------------------------------- */
/* prints Output sentence on screen */
cout << "DONE!: \n";
cout << "Position: " << position << "\n";
ofLog() << " event at " << f << endl;
/* -------------------------------
@daitomanabe
daitomanabe / neural-style-gpu-in-ec2.markdown
Last active June 1, 2016 00:57
easy set up for neural-stlye with Cuda7.5 + cuDNN5 in EC2

#neural-style with Cuda7.5 + cuDNN5 in EC2

  • if you want to skip installing nvidia driver and cuda7.5, use this Ubuntu 14 AMI.
    https://aws.amazon.com/marketplace/pp/B01EYKBEQ0
    (Nvidia Drivers, Cuda 7.5 Toolkit, cuDNN pre-installed with Nvidia Drivers, Cuda 7.5 Toolkit, cuDNN 4, TensorFlow, and Jupyter to leverage Nvidia GRID instances)
    g2.2xlarge or better (GPU instance)
    Don't forget to make your root partition size bigger.

  • In case you want to install everything by yourself

@kjunichi
kjunichi / how2curlFileUpload.md
Last active October 12, 2016 20:31
curlコマンドでファイルをアップロードするには

はじめに

Dockerのコンテナ内で作ったファイルを急にホストに持っていきたくなった時

curl

curl -F hoge=@/path/to/file http://ホストのIPアドレス:ポート番号/path
@kylemcdonald
kylemcdonald / beat-detect-osc.cpp
Last active April 15, 2017 10:43
ofxAubio beat detector sent over OSC.
// Example settings.xml:
//
// {
// "destination": "localhost",
// "port": 9090,
// "device": 2
// }
#include "ofMain.h"
#include "ofEventUtils.h"
@kylemcdonald
kylemcdonald / t-SNE Implementation Comparison.ipynb
Last active December 20, 2017 01:47
Comparison of different t-SNE implementations for speed and results.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@arumani
arumani / AddCameraUsageToInfoPlist.cs
Last active September 12, 2018 04:04
UnityでiOSプロジェクトを書き出した際に、iOS 10でカメラを使う場合に必須の記述をInfo.plistに追加するスクリプト。/Assets/Editor/ 以下に置く
using UnityEngine;
using UnityEditor;
using UnityEditor.Callbacks;
using System.IO;
using UnityEditor.iOS.Xcode;
public class AddCameraUsageToInfoPlist {
[PostProcessBuildAttribute(99)]
public static void OnPostprocessBuild(BuildTarget target, string buildPath) {
@sbonfert
sbonfert / root-ro
Last active June 24, 2019 17:25 — forked from niun/root-ro
Read-only Root-FS with overlayfs for Raspian
#!/bin/sh
#
# Read-only Root-FS for Raspian
#
# Modified 2016 by Stefan Bonfert to make it compatible with Raspbian
# Jessie (vanilla).
#
# Modified 2015 by Pascal Rosin to work on raspian-ua-netinst with
# overlayfs integrated in Linux Kernel >= 3.18.
#