Update a single specified guide
491077
def _update_guide(self, guide, update=False, clear=True):
        """"""

        kml_filename = os.path.join(self.cache_path, guide + '.kml')
        geojson_filename = os.path.join(self.cache_path, guide + '.geojson')

        if not os.path.exists(geojson_filename) or update:
            try:
                data = request.urlopen(self.guides[guide]).read().decode(
                    'utf-8')
            except (request.URLError, request.HTTPError) as e:
                self.log('Could not get web guide data:', e, type(e), lvl=warn)
                return

            with open(kml_filename, 'w') as f:
                f.write(data)

            self._translate(kml_filename, geojson_filename)

        with open(geojson_filename, 'r') as f:
            json_data = json.loads(f.read())

        if len(json_data['features']) == 0:
            self.log('No features found!', lvl=warn)
            return

        layer = objectmodels['layer'].find_one({'name': guide})

        if clear and layer is not None:
            layer.delete()
            layer = None

        if layer is None:
            layer_uuid = std_uuid()
            layer = objectmodels['layer']({
                'uuid': layer_uuid,
                'name': guide,
                'type': 'geoobjects'
            })
            layer.save()
        else:
            layer_uuid = layer.uuid

        if clear:
            for item in objectmodels['geoobject'].find({'layer': layer_uuid}):
                self.log('Deleting old guide location', lvl=debug)
                item.delete()

        locations = []

        for item in json_data['features']:
            self.log('Adding new guide location:', item, lvl=verbose)
            location = objectmodels['geoobject']({
                'uuid': std_uuid(),
                'layer': layer_uuid,
                'geojson': item,
                'type': 'Skipperguide',
                'name': 'Guide for %s' % (item['properties']['Name'])
            })
            locations.append(location)

        self.log('Bulk inserting guide locations', lvl=debug)
        objectmodels['geoobject'].bulk_create(locations)
1154994
def rewrite_guides(self, guides):
        
        self._remove_avLst()
        avLst = self._add_avLst()
        for name, val in guides:
            gd = avLst._add_gd()
            gd.name = name
            gd.fmla = 'val %d' % val
350518
def update(self, item, dry_run=None):
        """"""
        logger.debug('Updating item. Item: {item} Table: {namespace}'.format(
            item=item,
            namespace=self.namespace
        ))

        if not dry_run:
            self.table.put_item(Item=item)

        return item
337543
function update() {
    var updateData = this._prepUpdate(this.single.update);
    var wheres = this.where();
    var returning = this.single.returning;
    return {
      sql: 'update ' + this.tableName + ' set ' + updateData.join(', ') + (wheres ? ' ' + wheres : '') + this._returning(returning),
      returning: returning
    };
  }
778233
def update(self, name=None, algorithm=None, protocol=None, halfClosed=None,
            port=None, timeout=None, httpsRedirect=None):
        
        return self.manager.update(self, name=name, algorithm=algorithm,
                protocol=protocol, halfClosed=halfClosed, port=port,
                timeout=timeout, httpsRedirect=httpsRedirect)
1248930
def update(self, title, key):
        
        json = None
        if title and key:
            data = {'title': title, 'key': key}
            json = self._json(self._patch(self._api, data=dumps(data)), 200)
        if json:
            self._update_(json)
            return True
        return False
178758
def update(connection=None, urls=None, force_download=False):
    
    db = DbManager(connection)
    db.db_import(urls=urls, force_download=force_download)
    db.session.close()
754194
def update(self, *args):
        ""
        for string in args:
            self._hobj.update(string)
        self._fobj = None
191730
def org_update(object_id, input_params={}, always_retry=True, **kwargs):
    
    return DXHTTPRequest('/%s/update' % object_id, input_params, always_retry=always_retry, **kwargs)
253320
def update(self, name=None, password=None, host=None):
        
        return self.manager.update(self, name=name, password=password,
                host=host)
282921
def cli(obj, name, email, password, status, text):
    """"""
    if not any([name, email, password, status, text]):
        click.echo('Nothing to update.')
        sys.exit(1)

    client = obj['client']
    try:
        r = client.update_me(name=name, email=email, password=password, status=status, attributes=None, text=text)
    except Exception as e:
        click.echo('ERROR: {}'.format(e))
        sys.exit(1)
    if r['status'] == 'ok':
        click.echo('Updated.')
    else:
        click.echo(r['message'])
1145172
def update(self, request, datum):
        """"""
        if getattr(self, 'action_present', False):
            self.verbose_name = self._get_action_name()
            self.verbose_name_plural = self._get_action_name('plural')
964761
def update(self, **kwargs):
    """"""
    for key, value in kwargs.items():
      setattr(self, key, value)
1345514
def _update_enabled(self, name, enabled_value):
        '''
        
        '''

        if isinstance(self.opts['beacons'][name], dict):
            # Backwards compatibility
            self.opts['beacons'][name]['enabled'] = enabled_value
        else:
            enabled_index = self._get_index(self.opts['beacons'][name], 'enabled')
            if enabled_index >= 0:
                self.opts['beacons'][name][enabled_index]['enabled'] = enabled_value
            else:
                self.opts['beacons'][name].append({'enabled': enabled_value})
202461
def update(collection_name, upsert, multi, spec,
           doc, safe, last_error_args, check_keys, opts, ctx=None):
    """"""
    if ctx:
        return _update_compressed(
            collection_name, upsert, multi, spec, doc, check_keys, opts, ctx)
    return _update_uncompressed(collection_name, upsert, multi, spec,
                                doc, safe, last_error_args, check_keys, opts)
704434
def update(self, item, dry_run=None):
        """"""
        logger.debug('Updating item. Item: {item} Path: {data_file}'.format(
            item=item,
            data_file=self.data_file
        ))
        self.delete(item, dry_run=dry_run)
        return self.create(item, dry_run=dry_run)
1352804
def update(self, name, modifiers):
        """"""
        self.update_name(name)
        self.modifiers = modifiers