def __init__(self, *args, **kwargs): BaseProcessor.__init__(self, *args, **kwargs) self.build_args() self.city_map = {} self.build_city_map()
def __init__(self, *args, **kwargs): BaseProcessor.__init__(self, *args, **kwargs) self.args = self.args_builder() # 初始化merger self.mergers = [] merger_rules = load_yaml()['merger'] name_list = self.args.merger if self.args.merger else [ 'LocalityAppender' if self.args.type == 'mdd' else 'PoiAppender', 'SetAdder', 'Overwriter', 'ImageMerger', 'EditorMerger'] for name in name_list: rule = merger_rules[name] m = globals()[rule['class']]() if 'fields' in rule and rule['fields']: m.add_fields(rule['fields']) if 'priority' in rule: m.priority = rule['priority'] self.mergers.append(m) self.mergers = sorted(self.mergers, key=lambda v: v.priority)
def __init__(self): BaseProcessor.__init__(self) self.priority = 30 self.tick_to_packets = dict() self.flag_packets = list() self.start_tick = None self.last_tick = None
def __init__(self, *args, **kwargs): BaseProcessor.__init__(self, *args, **kwargs) self.build_args() # 缓存的城市信息 from gevent.lock import BoundedSemaphore self._city_cache = {} self._city_cache_lock = BoundedSemaphore(1)
def __init__(self, *args, **kwargs): BaseProcessor.__init__(self, *args, **kwargs) self.bdurl = 'http://api.map.baidu.com/geoconv/v1/' self.gspurl = 'http://api.gpsspg.com/convert/latlng/' self.bdak = '7P5mAce1fZubQOahgDTCAWHo' self.gspak = 'EBA5F8F9D7E5CA7E8488EC7B99DFEA23' self.gspoid = 506 self.mongoconn = None self.http_error_count = 0 self.error_limit = 20 self.to_do_list = []
def __init__(self, name, desc, columns, notes=''): BaseProcessor.__init__(self) assert name and len(name) > 0, 'Award processor requires a name.' assert desc and len(desc) > 0, 'Award processor requires a description.' assert columns and len(columns) > 0, 'Award processor requires at least one column.' self.name = name self.desc = desc self.columns = columns self.notes = notes self.results = collections.Counter()
def __init__(self, name, desc, columns, notes=""): BaseProcessor.__init__(self) assert name and len(name) > 0, "Award processor requires a name." assert desc and len(desc) > 0, "Award processor requires a description." assert columns and len(columns) > 0, "Award processor requires at least one column." self.name = name self.desc = desc self.columns = columns self.notes = notes self.results = collections.Counter()
def __init__(self): BaseProcessor.__init__(self) self.priority = 20
def __init__(self, *args, **kwargs): BaseProcessor.__init__(self, *args, **kwargs) self.args = self.args_builder()
def __init__(self): BaseProcessor.__init__(self) self.priority = 20 self.vehicles = dict() self.victims = dict()
def __init__(self, *args, **kwargs): BaseProcessor.__init__(self, *args, **kwargs) BaiduSuggestion.__init__(self, *args, **kwargs)
def __init__(self): BaseProcessor.__init__(self) self.priority = 30 self.games = dict() self.game = None
def __init__(self): BaseProcessor.__init__(self) self.priority = 20 self.vehicles = dict()
def __init__(self, *args, **kwargs): BaseProcessor.__init__(self, *args, **kwargs) MfwImageExtractor.__init__(self) self.args = self.args_builder()
def __init__(self, *args, **kwargs): BaseProcessor.__init__(self, *args, **kwargs) self.args = self.args_builder() self.conn = None self.denom = None
def __init__(self, *args, **kwargs): BaseProcessor.__init__(self, *args, **kwargs)