straup / py-wsclustr Goto Github PK
View Code? Open in Web Editor NEWPython bindings for spinning up and using an EC2 instance running ws-clustr.
Python bindings for spinning up and using an EC2 instance running ws-clustr.
Python bindings for ws-clustr.php (optionally running it using an EC2 instance) If you pass it a file containing points it will return a compressed shapefile for those points created by the Clustr application. http://code.flickr.com/blog/2008/10/30/the-shape-of-alpha/ http://code.flickr.com/blog/2009/04/07/the-only-question-left-is/ http://www.aaronland.info/weblog/2009/04/12/hammock#py-wsclustr-php http://github.com/straup/py-wsclustr/ http://github.com/straup/ws-clustr/ -- Usage (from your code) : # IMPORTANT: # # A backwards incompatible change the interface for this library # was made on 20090420. If you are using an earlier version you # should update your code accordingly. Sorry about that. The plan # is to avoid doing that again in the future. # # Connecting to localhost # clustr = wsclustr.wsclustr(hostname='localhost') shpfile = clustr.clustr('/path/to/points.txt', try_cache=1) # # Connecting to EC2 # clustr = wsclustr.ec2(access_key='access_key', secret_key='secret_key') clustr.startup(ami='ami-xxxxx') while not clustr.ready() : time.sleep(5) shpfile = clustr.clustr('/path/to/points.txt', try_cache=1) clustr.shutdown() -- Usage (connecting to EC2, from the command line) : $> python examples/ec2.py -c ~/path/to/aws.cfg -A ami-xxxxx -P ~/path/to/points.txt -f ~/path/to/test.tar.gz -a 0.02 Options: -h, --help show this help message and exit -c CONFIG, --config=CONFIG path to an ini config file -E ENDPOINT, --endpoint=ENDPOINT the endpoint that ws-clustr is running on -A AMI, --ami=AMI the name of the EC2 AMI to use -P POINTS, --points=POINTS the path of the points file to clustrize -C, --try_cache first ask ws-clustr to use a cached version of your points file -a ALPHA, --alpha=ALPHA the size of the alpha to clustr the points file with -f FILENAME, --filename=FILENAME the name of your shapefile -t, --terminate terminate the AMI instance -v, --verbose enable verbose logging -- EC2 Notes: If you already have a running instance of a given AMI then it will be used rather than spinning up a new server. At the moment, this code does not account for multiple instances of the same AMI running. It simply uses the first one it finds. -- Example config file: [aws] access_key=AMAZON_WEBSERVICES_ACCESSKEY secret_key=AMAZON_WEBSERVICES_SECRETKEY
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.