Skip to content

Instantly share code, notes, and snippets.

View amiller's full-sized avatar

Andrew Miller amiller

View GitHub Profile
In [1]: import hadoopy
In [2]: hadoopy.launch_frozen('input/wc-input-alice.tb','output/','wc.py')
python /usr/local/lib/python2.6/dist-packages/hadoopy/thirdparty/pyinstaller/Configure.py
I: read old config from /usr/local/lib/python2.6/dist-packages/hadoopy/thirdparty/pyinstaller/config.dat
I: computing EXE_dependencies
I: Finding TCL/TK...
I: Analyzing /usr/lib/python2.6/lib-dynload/_multibytecodec.so
I: Skipping libpthread.so.0 dependency of _multibytecodec.so
I: Skipping libc.so.6 dependency of _multibytecodec.so
In [12]: hadoopy.launch_frozen('input/wc-input-alice.tb','output/','tests/wc.py')
python hadoopy/thirdparty/pyinstaller/Configure.py
I: read old config from hadoopy/thirdparty/pyinstaller/config.dat
I: computing EXE_dependencies
I: Finding TCL/TK...
I: Analyzing /usr/lib/python2.6/lib-dynload/_multibytecodec.so
I: Skipping libpthread.so.0 dependency of _multibytecodec.so
I: Skipping libc.so.6 dependency of _multibytecodec.so
I: Analyzing /usr/lib/python2.6/lib-dynload/datetime.so
I: Skipping libm.so.6 dependency of datetime.so
diff --git a/hadoopy/_freeze.py b/hadoopy/_freeze.py
index 0923e30..445ed88 100644
--- a/hadoopy/_freeze.py
+++ b/hadoopy/_freeze.py
@@ -56,12 +56,17 @@ def _wrap_string(s):
def _run(path):
print(path)
+
subprocess.call(path.split())
11/01/27 01:13:10 ERROR streaming.StreamJob: Error Launching job : org.apache.hadoop.security.AccessControlException: Permission denied: user=amiller, access=EXECUTE, inode="input":amiller:supergroup:rw-r--r--
Streaming Command Failed!
I: Testing for Unicode support...
Traceback (most recent call last):
File "/usr/local/lib/python2.6/dist-packages/hadoopy/thirdparty/pyinstaller/Configure.py", line 340, in <module>
main(opts.configfile)
File "/usr/local/lib/python2.6/dist-packages/hadoopy/thirdparty/pyinstaller/Configure.py", line 313, in main
test_unicode(config)
File "/usr/local/lib/python2.6/dist-packages/hadoopy/thirdparty/pyinstaller/Configure.py", line 239, in test_unicode
open(_useUnicodeFN, 'w').write(_useUnicode % module)
IOError: [Errno 13] Permission denied: '/usr/local/lib/python2.6/dist-packages/hadoopy/thirdparty/pyinstaller/support/useUnicode.py'
..endian_test: endian_test.c:27: cmp: Assertion `(0) == (__extension__ ({ union { __extension__ unsigned long long int __ll; unsigned int __l[2]; } __w, __r; if (__builtin_constant_p (vali)) __r.__ll = ((((vali) & 0xff00000000000000ull) >> 56) | (((vali) & 0x00ff000000000000ull) >> 40) | (((vali) & 0x0000ff0000000000ull) >> 24) | (((vali) & 0x000000ff00000000ull) >> 8) | (((vali) & 0x00000000ff000000ull) << 8) | (((vali) & 0x0000000000ff0000ull) << 24) | (((vali) & 0x000000000000ff00ull) << 40) | (((vali) & 0x00000000000000ffull) << 56)); else { __w.__ll = (vali); __r.__l[0] = (__extension__ ({ register unsigned int __v, __x = (__w.__l[1]); if (__builtin_constant_p (__x)) __v = ((((__x) & 0xff000000) >> 24) | (((__x) & 0x00ff0000) >> 8) | (((__x) & 0x0000ff00) << 8) | (((__x) & 0x000000ff) << 24)); else __asm__ ("bswap %0" : "=r" (__v) : "0" (__x)); __v; })); __r.__l[1] = (__extension__ ({ register unsigned int __v, __x = (__w.__l[0]); if (__builtin_constant_p (__x)) __v = ((((__x) & 0xff000000) >> 24) | (((_
import cv
cap = cv.CreateCameraCapture(0)
frame = cv.QueryFrame(cap)
cv.ShowImage('frame', frame)
python server.py
Traceback (most recent call last):
File "/usr/local/lib/python2.6/dist-packages/web.py-0.34-py2.6.egg/web/application.py", line 242, in process
return self.handle()
File "/usr/local/lib/python2.6/dist-packages/web.py-0.34-py2.6.egg/web/application.py", line 233, in handle
return self._delegate(fn, self.fvars, args)
File "/usr/local/lib/python2.6/dist-packages/web.py-0.34-py2.6.egg/web/application.py", line 415, in _delegate
return handle_class(cls)
File "/usr/local/lib/python2.6/dist-packages/web.py-0.34-py2.6.egg/web/application.py", line 390, in handle_class
return tocall(*args)
File Edit Options Buffers Tools Sh-Script Help
#!/bin/bash
pushd data/sets/ > /dev/null
mkdir -p data/sets/
mkdir -p archives
find . -maxdepth 1 -mindepth 1 -type d -not -name archives -not -name data | while read -r set
do
export set set=`basename $set`
touch -d "`find $set -exec stat \{} --printf="%y\n" \; | sort -n -r | head -1`" ${set}test
if [ ${set}test -nt archives/$set.tar.gz ]
#!/bin/bash
# This file is used to split up the datasets into their own archives before
# they are uploaded to S3.
pushd data/sets/ > /dev/null
mkdir -p data/sets/
mkdir -p ../archives
find . -maxdepth 1 -mindepth 1 -type d -not -name data | while read -r set
do