module.py
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011 ini={}
00012 cm_kernel=None
00013
00014
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
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}