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
// MPO2Stereo: | |
// Converts Fujifilm MPO format 3D | |
// images into JPEG stereo pairs | |
// | |
// code by: | |
// Andres Hernandez [cybereality] | |
#include <iostream> | |
#include <fstream> |
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
// vim: set hls is si et sw=4 sts=4 nu: | |
#include <stdio.h> | |
#include <string.h> | |
#include <FreeImage.h> | |
#include "DDImage/DDWindows.h" | |
#include "DDImage/Reader.h" | |
#include "DDImage/Row.h" | |
#include "DDImage/Knob.h" |
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
#!/usr/bin/env python | |
from flask import Flask | |
from flask import request | |
from flask import render_template | |
app = Flask(__name__) | |
@app.route('/hello') | |
def hello_world(): |
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
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
import sys | |
import numpy | |
import OpenEXR | |
import Imath | |
import Image |
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
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
import pydoc | |
import sys | |
def usage(): | |
print 'man for python.' | |
print 'Usage: manpy OBJECT' | |
print 'Ex: manpy os.walk' |
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
## {{{ http://code.activestate.com/recipes/577360/ (r1) | |
import threading | |
def concurrent_map(func, data): | |
""" | |
Similar to the bultin function map(). But spawn a thread for each argument | |
and apply `func` concurrently. | |
Note: unlike map(), we cannot take an iterable argument. `data` should be an | |
indexable sequence. |
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 <stdio.h> | |
#include <string.h> | |
#include <freeimage.h> | |
#include "DDImage/DDWindows.h" | |
#include "DDImage/Reader.h" | |
#include "DDImage/Row.h" | |
#include "DDImage/Knob.h" | |
#include "DDImage/Knobs.h" |
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
def eval(x, env=global_env): | |
"Evaluate an expression in an environment." | |
if isa(x, Symbol): # variable reference | |
return env.find(x)[x] | |
elif not isa(x, list): # constant literal | |
return x | |
elif x[0] == 'quote': # (quote exp) | |
(_, exp) = x | |
return exp | |
elif x[0] == 'if': # (if test conseq alt) |
NewerOlder