Welcome    Usage    Browse    Find CID    Search     Log in

cM API Documentation

module.py

Go to the documentation of this file.
00001 #
00002 # Collective Mind
00003 #
00004 # See cM LICENSE.txt for licensing details.
00005 # See cM Copyright.txt for copyright details.
00006 #
00007 # Developer(s): (C) Grigori Fursin, started on 2011.09
00008 #
00009 
00010 # Should always be here
00011 ini={}
00012 cm_kernel=None
00013 
00014 # Local settings
00015 import string
00016 import os
00017 import urllib2
00018 import json
00019 
00020 # ============================================================================
00021 def init(i):
00022     return {'cm_return':0}
00023 
00024 # ============================================================================
00025 def create(i):
00026 
00027     """
00028     Create dataset
00029     (for now only for polybench)
00030 
00031     Input:  {
00032               dataset_type     - 'polybench'
00033               dataset_repo_uoa - repo where to create entries
00034             }
00035 
00036     Output: {
00037               cm_return                        - if =0, success
00038             }
00039     """
00040 
00041     dt=i.get('dataset_type','')
00042     if dt=='': dt='polybench'
00043 
00044     dru=i.get('dataset_repo_uoa','')
00045 
00046     # check dataset type
00047     if dt=='polybench':
00048        print 'hello'
00049 
00050 
00051 
00052     else:
00053        return {'cm_return':1, 'cm_error':'dataset_type is not recognized'}
00054 
00055     return {'cm_return':0}

Generated on Wed May 28 02:49:02 2014 for Collective Mind Framework by DoxyGen 1.6.1
Concept, design and coordination: Grigori Fursin (C) 1993-2013