This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var express = require('express') | |
, osc = require('osc4node') | |
, app = express.createServer() | |
, port = process.env.PORT || 3000; | |
app.configure(function() { | |
app.use(app.router); | |
}); | |
app.get('/', function(req, res) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#encoding: utf-8 | |
require 'rubygems' | |
require 'open-uri' | |
require 'koala' | |
access_token = 'my_holy_token' | |
@graph = Koala::Facebook::API.new(access_token) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
on run {argv} | |
display dialog "Enter port number" default answer "8888" | |
set targetPort to text returned of result | |
tell application "Terminal" | |
set currentTab to do script "cd " & (argv)'s POSIX path | |
delay 1 | |
do script "php -S localhost:" & targetPort in currentTab | |
end tell | |
end run |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include "ofMain.h" | |
class ofApp : public ofBaseApp | |
{ | |
public: | |
ofMesh mesh, ellipse; | |
double scale = 200.0; | |
//-------------------------------------------------------------- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ofVbo mHemisphere; | |
void ofApp::setup() | |
{ | |
const auto resolution_ = 256; | |
const auto radius_ = 100.0; | |
std::vector<ofVec3f> vertices_; | |
for (auto i = 0; i < resolution_; ++i) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
auto main() -> int | |
{ | |
NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; | |
NSURL *basePath = [NSURL URLWithString:@"path/to/directory"]; | |
NSFileManager *fm = [NSFileManager defaultManager]; | |
NSArray<NSString *> *files = [fm contentsOfDirectoryAtPath:[basePath absoluteString] error:nil]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2016-04-01 20:45:42.106 exampleDebug[60445:27200058] -[__NSTaggedDate _cfurl]: unrecognized selector sent to instance 0x4d | |
2016-04-01 20:45:42.107 exampleDebug[60445:27200058] An uncaught exception was raised | |
2016-04-01 20:45:42.107 exampleDebug[60445:27200058] -[__NSTaggedDate _cfurl]: unrecognized selector sent to instance 0x4d | |
2016-04-01 20:45:42.107 exampleDebug[60445:27200058] ( | |
0 CoreFoundation 0x00007fff8ffb7ae2 __exceptionPreprocess + 178 | |
1 libobjc.A.dylib 0x00007fff89d5af7e objc_exception_throw + 48 | |
2 CoreFoundation 0x00007fff8ffbab9d -[NSObject(NSObject) doesNotRecognizeSelector:] + 205 | |
3 CoreFoundation 0x00007fff8fef3601 ___forwarding___ + 1009 | |
4 CoreFoundation 0x00007fff8fef3188 _CF_forwarding_prep_0 + 120 | |
5 CoreFoundation 0x00007fff8feb0749 CFURLCreateCopyAppendingPathComponent + 137 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[verbose] ofxEdsdk::setup: connected camera model: Canon EOS 5D Mark III 0 | |
[verbose] property event kEdsPropertyEvent_PropertyChanged: kEdsPropID_Evf_OutputDevice / 0 | |
[verbose] property event kEdsPropertyEvent_PropertyChanged: kEdsPropID_Evf_OutputDevice / 0 | |
[verbose] property event kEdsPropertyEvent_PropertyChanged: kEdsPropID_AEBracket / 0 | |
[verbose] property event kEdsPropertyEvent_PropertyChanged: kEdsPropID_AEMode / 0 | |
[verbose] property event kEdsPropertyEvent_PropertyChanged: kEdsPropID_AFMode / 0 | |
[verbose] property event kEdsPropertyEvent_PropertyChanged: kEdsPropID_DriveMode / 0 | |
[verbose] property event kEdsPropertyEvent_PropertyChanged: kEdsPropID_MeteringMode / 0 | |
[verbose] property event kEdsPropertyEvent_PropertyChanged: kEdsPropID_WhiteBalance / 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding: utf-8 -*- | |
import numpy as np | |
import cv2 | |
import math | |
def main(): | |
img = cv2.imread('images/sample_8.jpg') | |
height, width, channels = img.shape |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding: utf-8 -*- | |
import numpy as np | |
import cv2 | |
import math | |
def rgb_to_hsv(r, g, b): | |
hsv = cv2.cvtColor(np.array([[[b, g, r]]], dtype=np.uint8), cv2.COLOR_BGR2HSV)[0][0] | |
return (hsv[0], hsv[1], hsv[2]) |
OlderNewer