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
import hadoopy | |
import numpy as np | |
import logging | |
logging.basicConfig(level=logging.DEBUG) | |
hdfs_output = 'hadoopy_example/vecstats' | |
def main(): | |
if hadoopy.exists(hdfs_output): |
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
''' | |
Pure cython version | |
compile with: | |
$ cython cgibbs.pyx | |
$ gcc -shared -pthread -fPIC -fwrapv -O2 -Wall -fno-strict-aliasing -I/usr/include/python2.6 -o cgibbs.so cgibbs.c | |
then import from python shell and call main() | |
''' | |
import random,math, time |