本文整理汇总了Python中pypes.component.Component类的典型用法代码示例。如果您正苦于以下问题:Python Component类的具体用法?Python Component怎么用?Python Component使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了Component类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Python代码示例。
示例1: __init__
def __init__(self):
# initialize parent class
Component.__init__(self)
# Optionally add/remove component ports
# self.remove_output('out')
# self.add_input('in2', 'A description of what this port is used for')
locs = ["World", "Asia", "Africa", "North America", "South America",
"Antarctica", "Europe", "Australia"
"AL", "AK", "AZ", "AR", "CA", "CO", "CT", "DC", "DE", "FL", "GA",
"HI", "ID", "IL", "IN", "IA", "KS", "KY", "LA", "ME", "MD",
"MA", "MI", "MN", "MS", "MO", "MT", "NE", "NV", "NH", "NJ",
"NM", "NY", "NC", "ND", "OH", "OK", "OR", "PA", "RI", "SC",
"SD", "TN", "TX", "UT", "VT", "VA", "WA", "WV", "WI", "WY"]
self.remove_input('in')
self.remove_output('out')
self.add_input('source', '(edu.utah.sci.vistrails.basic:String)')
self.add_output('files', '(edu.utah.sci.vistrails.basic:File)')
self.set_parameter('From', '1/1/1900', None, 'edu.utah.sci.vistrails.basic:Date')
self.set_parameter('To ', '12/31/2012', None, 'edu.utah.sci.vistrails.basic:Date')
self.set_parameter('Location','World', locs, 'edu.utah.sci.vistrails.basic:String')
self.set_parameter('MaxItems','1', None, 'edu.utah.sci.vistrails.basic:Integer')
self.set_package('edu.utah.sci.vistrails.http')
self.set_version('0.0.1')
# Setup any user parameters required by this component
# 2nd arg is the default value, 3rd arg is optional list of choices
#self.set_parameter('MyParam', 'opt1', ['opt1', 'opt2', 'opt3'])
# log successful initialization message
log.info('Component Initialized: %s' % self.__class__.__name__)
开发者ID:aashish24,项目名称:climatepipes1,代码行数:34,代码来源:filter.py
示例2: __init__
def __init__(self):
# initialize parent class
Component.__init__(self)
self.set_parameter('mapfile', 'etc/sample-xmlmap.xml')
self.set_parameter('input', 'xml')
self._docroot = './'
log.info('Component Initialized: %s' % self.__class__.__name__)
开发者ID:Big-Data,项目名称:pypes,代码行数:7,代码来源:xmlmappertransformer.py
示例3: __init__
def __init__(self):
# initialize parent class
Component.__init__(self)
# remove the output port since this is a publisher
self.remove_output('out')
# solr host, port, and path (core)
self.set_parameter('host', 'localhost')
self.set_parameter('port', 8983)
self.set_parameter('path', '/solr')
# if we should commit after each batch
# set to OFF if using the auto commit feature
self.set_parameter('commit', 'True', ['True', 'False'])
# wait_flush and wait_searcher
self.set_parameter('wait_flush', 'True', ['True', 'False'])
self.set_parameter('wait_searcher', 'True', ['True', 'False'])
# overwrite previously commited docs with same id
self.set_parameter('overwrite', 'True', ['True', 'False'])
# commit within time in milliseconds (0 = disabled)
self.set_parameter('commit_within', '0')
# log successful initialization message
log.info('Component Initialized: %s' % self.__class__.__name__)
开发者ID:Enucatl,项目名称:pypes,代码行数:28,代码来源:solrpublisher.py
示例4: __init__
def __init__(self):
# initialize parent class
Component.__init__(self)
# remove the output port since this is a publisher
self.remove_output("out")
# solr host, port, and path (core)
self.set_parameter("host", "localhost")
self.set_parameter("port", 8983)
self.set_parameter("path", "/solr")
# if we should commit after each batch
# set to OFF if using the auto commit feature
self.set_parameter("commit", "True", ["True", "False"])
# wait_flush and wait_searcher
self.set_parameter("wait_flush", "True", ["True", "False"])
self.set_parameter("wait_searcher", "True", ["True", "False"])
# overwrite previously commited docs with same id
self.set_parameter("overwrite", "True", ["True", "False"])
# commit within time in milliseconds (0 = disabled)
self.set_parameter("commit_within", "0")
# log successful initialization message
log.info("Component Initialized: %s" % self.__class__.__name__)
开发者ID:marc-truitt,项目名称:pypes,代码行数:28,代码来源:solrpublisher.py
示例5: __init__
def __init__(self):
# initialize parent class
Component.__init__(self)
# create an instance of the pdf converter
self._converter = PDFConverter()
log.info('Component Initialized: %s' % self.__class__.__name__)
开发者ID:Big-Data,项目名称:pypes,代码行数:8,代码来源:pdfreaderadapter.py
示例6: __init__
def __init__(self):
# initialize parent class
Component.__init__(self)
self.set_parameter('fields', '')
self.set_parameter('dropvalues', '_any_')
# log successful initialization message
log.info('Component Initialized: %s' % self.__class__.__name__)
开发者ID:Enucatl,项目名称:pypes,代码行数:9,代码来源:dropdocumentfilter.py
示例7: __init__
def __init__(self):
# initialize parent class
Component.__init__(self)
#Setup any user parameters required by this component
self.set_parameter('fields', '')
# log successful initialization message
log.info('Component Initialized: %s' % self.__class__.__name__)
开发者ID:Big-Data,项目名称:pypes,代码行数:9,代码来源:deletefieldtransformer.py
示例8: __init__
def __init__(self):
# initialize parent class
Component.__init__(self)
# if true, the raw html will be placed in the html field
self.set_parameter('keep_html', 'False', ['True', 'False'])
# log successful initialization message
log.info('Component Initialized: %s' % self.__class__.__name__)
开发者ID:Big-Data,项目名称:pypes,代码行数:9,代码来源:htmladapter.py
示例9: __init__
def __init__(self):
# initialize parent class
Component.__init__(self)
self.set_parameter("sources", "")
self.set_parameter("destinations", "")
self.set_parameter("mode", "Abort", ["Abort", "Append", "Overwrite"])
# log successful initialization message
log.info("Component Initialized: %s" % self.__class__.__name__)
开发者ID:marc-truitt,项目名称:pypes,代码行数:10,代码来源:copyfieldtransformer.py
示例10: __init__
def __init__(self):
# initialize parent class
Component.__init__(self)
self.set_parameter('original_names', '')
self.set_parameter('new_names', '')
self.set_parameter('mode', 'Abort', ['Abort', 'Append', 'Overwrite'])
# log successful initialization message
log.info('Component Initialized: %s' % self.__class__.__name__)
开发者ID:Big-Data,项目名称:pypes,代码行数:10,代码来源:renamefieldtransformer.py
示例11: __init__
def __init__(self):
# initialize parent class
Component.__init__(self)
# the field that contains the address information
# most likely from the AddressExtractor
self.set_parameter('address_field', 'addresses')
# log successful initialization message
log.info('Component Initialized: %s' % self.__class__.__name__)
开发者ID:Enucatl,项目名称:pypes,代码行数:10,代码来源:geocodetransformer.py
示例12: __init__
def __init__(self):
Component.__init__(self)
# remove the defaut outport port since this is a PUBLISHER
self.remove_output('out')
# create a runtime parameter for the user to specify an output filename
self.set_parameter('output directory', '')
# runtime paraneter allowing user to choose an output format (defaults to JPEG)
self.set_parameter('format', 'JPEG', ['JPEG', 'PNG', 'GIF', 'BMP', 'TIFF', 'EPS'])
log.info('Component Initialized: %s' % self.__class__.__name__)
开发者ID:fullscale,项目名称:pypes-imaging,代码行数:12,代码来源:imagepublisher.py
示例13: __init__
def __init__(self):
# initialize parent class
Component.__init__(self)
self.set_parameter('fields', '')
# we can specify multiple input formats that if matched
# will be normalized to the output format
self.set_parameter('in_formats', '%m/%d/%Y|%m/%Y|%Y')
self.set_parameter('out_format', '%Y-%m-%dT%H:%M:%SZ')
log.info('Component Initialized: %s' % self.__class__.__name__)
开发者ID:Big-Data,项目名称:pypes,代码行数:12,代码来源:datenormalizertransformer.py
示例14: __init__
def __init__(self):
# initialize parent class
Component.__init__(self)
self.set_parameter("fields", "")
# we can specify multiple input formats that if matched
# will be normalized to the output format
self.set_parameter("in_formats", "%m/%d/%Y|%m/%Y|%Y")
self.set_parameter("out_format", "%Y-%m-%dT%H:%M:%SZ")
log.info("Component Initialized: %s" % self.__class__.__name__)
开发者ID:Enucatl,项目名称:pypes,代码行数:12,代码来源:datenormalizertransformer.py
示例15: __init__
def __init__(self):
# initialize parent class
Component.__init__(self)
# publishers don't have an output port
self.remove_output('out')
self.set_parameter('output_dir', 'fastxml')
self.set_parameter('on_exist', 'Abort', ['Abort', 'Overwrite',
'NextAvaiable'])
# log successful initialization message
log.info('Component Initialized: %s' % self.__class__.__name__)
开发者ID:Big-Data,项目名称:pypes,代码行数:13,代码来源:fastxmlpublisher.py
示例16: __init__
def __init__(self):
# initialize parent class
Component.__init__(self)
self.remove_output('out')
self.set_parameter('host', 'localhost')
self.set_parameter('port', '2600')
self.set_parameter('collection', '')
# cloud9 bulk indexing end point
self.index_path = '/v1/_bulk/'
self.headers = {'content-type': 'application/json; charset=utf-8'}
log.info('Component Initialized: %s' % self.__class__.__name__)
开发者ID:tvillalba,项目名称:pypes-cloud9,代码行数:14,代码来源:cloud9.py
示例17: __init__
def __init__(self):
Component.__init__(self)
self.set_parameter('size', '(128, 128)')
self.set_parameter('filter', 'ANTIALIAS', ['ANTIALIAS', 'NEAREST', 'BILINEAR', 'BICUBIC'])
self.filter_dict = {
'ANTIALIAS': Image.ANTIALIAS,
'NEAREST': Image.NEAREST,
'BILINEAR': Image.BILINEAR,
'BICUBIC': Image.BICUBIC
}
log.info('Component Initialized: %s' % self.__class__.__name__)
开发者ID:fullscale,项目名称:pypes-imaging,代码行数:14,代码来源:imagethumbnail.py
示例18: __init__
def __init__(self):
# initialize parent class
Component.__init__(self)
# this is a publisher so there is no output
self.remove_output('out')
self.set_parameter('outfile', 'pypescsvoutput.csv')
self.set_parameter('fields', '_originals_')
# used to join multivaled fields
self.set_parameter('multi_separator', ';')
# log successful initialization message
log.info('Component Initialized: %s' % self.__class__.__name__)
开发者ID:Enucatl,项目名称:pypes,代码行数:15,代码来源:csvwriterpublisher.py
示例19: __init__
def __init__(self):
Component.__init__(self)
# define email regular expression string
emailre = r'((?:[a-zA-Z0-9_\-\.]+)@(?:(?:\[[0-9]{1,3}\.[0-9]{1,3}\.' \
r'[0-9]{1,3}\.)|(?:(?:[a-zA-Z0-9\-]+\.)+))(?:[a-zA-Z]{2,4}' \
r'|[0-9]{1,3})(?:\]?))'
# compile the regular expression
self._reobj = re.compile(emailre)
# set component parameters
self.set_parameter('fields', '')
self.set_parameter('destination', 'emails')
log.info('Component Initialized: %s' % self.__class__.__name__)
开发者ID:Enucatl,项目名称:pypes,代码行数:16,代码来源:emailextractor.py
示例20: __init__
def __init__(self):
# initialize parent class
Component.__init__(self)
# Optionally add/remove component ports
# self.remove_output('out')
# self.add_input('in2', 'A description of what this port is used for')
# Setup any user parameters required by this component
# 2nd arg is the default value, 3rd arg is optional list of choices
#self.set_parameter('MyParam', 'opt1', ['opt1', 'opt2', 'opt3'])
self.remove_input('in')
self.remove_output('out')
self.add_input('files', '(edu.utah.sci.vistrails.basic:File)')
self.set_package('edu.utah.sci.vistrails.http')
# log successful initialization message
log.info('Component Initialized: %s' % self.__class__.__name__)
开发者ID:aashish24,项目名称:climatepipes1,代码行数:20,代码来源:isofillview.py
注:本文中的pypes.component.Component类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论