Removes tags from objects resolved from guids

    :param tags: Tags to remove
    :type tags: list
    :param guids: Guids to remove tags from
    :type guids: list
    :returns: json
171865
def delete(request, obj_id=None):
    
    res = Result()

    if obj_id:
        # -- Delete the tag itself
        tag = Tag.objects.get(pk=obj_id)
        guids = []
        images = Image.objects.filter(tags__id=obj_id)
        guids += [_.guid for _ in images]
        videos = Video.objects.filter(tags__id=obj_id)
        guids += [_.guid for _ in videos]
        # -- Remove all tags from objects
        _manageTags([tag.id], guids, add=False)
        # -- Delete old tags
        tag.delete()
    else:
        tags = [_ for _ in request.DELETE.get('tags', '').split(',') if _]
        guids = [_ for _ in request.DELETE.get('guids', '').split(',') if _]

        _manageTags(tags, guids, add=False)

    return JsonResponse(res.asDict())
932683
def _manageTags(tagList, guids, add=True):
    
    objects = getObjectsFromGuids(guids)
    tags = []
    for tag in tagList:
        try:
            t = Tag.objects.get(pk=int(tag))
        except ValueError:
            t = Tag.objects.get_or_create(name=tag.lower())[0]
        tags.append(t)

    if add:
        return _addTags(tags, objects)
    else:
        return _removeTags(tags, objects)
738833
def remove_tags(jobflow_id, keys)
      params = {
        :operation => 'RemoveTags',
        :resource_id => jobflow_id,
        :tag_keys => keys
      }
      aws_result = @aws_request.submit(params)
      yield aws_result if block_given?
    end
78603
def remove_tags(alert_ids, tag_names)
      query = generate_query_params(alertIds: alert_ids, tagNames: tag_names)
      http_delete('/tags' + query)
    end
1137190
def remove_tags(self, server, tags):
        
        uuid = str(server)
        tags = [str(tag) for tag in tags]

        url = '/server/{0}/untag/{1}'.format(uuid, ','.join(tags))
        return self.post_request(url)
129810
def delete(self, filething=None):
        

        self.tags.clear()
        self.save(filething, padding=lambda x: 0)
1128969
def DeleteClusterTags(r, tags, dry_run=False):
    

    query = {
        "dry-run": dry_run,
        "tag": tags,
    }

    return r.request("delete", "/2/tags", query=query)
176554
function remove(tags, i) {
      tags.splice(i, 1);
      this.unmount();
      arrayishRemove(this.parent, this, this.__.tagName, true);
    }
1369127
def delete_tag(self, tag):
        
        j, r = self.datacenter.request('DELETE', self.path + '/tags/' + tag)
        r.raise_for_status()
1240844
def remove_entity_tags(self):
        '''
        
        '''
        terms_to_remove = [term for term in self._term_idx_store._i2val
                           if any([word in SPACY_ENTITY_TAGS for word in term.split()])]
        return self.remove_terms(terms_to_remove)
929431
def clear(self, tag=None):
        
        if tag is None:
            del self.jobs[:]
        else:
            self.jobs[:] = (job for job in self.jobs if tag not in job.tags)
498819
public DeleteReservationResult withTags(java.util.Map<String, String> tags) {
        setTags(tags);
        return this;
    }
206474
function deleteTags() {
  return git.fetch({tags: true, remote: remote})
      .then(function() {
        return git.removeTags({
          remote: remote,
          tags: git.getTags //using resolvables
        });  
      });
}
1080659
def remove_tag(self, tag):
        # type: (str) -> bool
        
        return self._remove_hdxobject(self.data.get('tags'), tag, matchon='name')
134416
public static function delete_tags($tagids) {
        global $DB;

        if (!is_array($tagids)) {
            $tagids = array($tagids);
        }
        if (empty($tagids)) {
            return;
        }

        // Use the tagids to create a select statement to be used later.
        list($tagsql, $tagparams) = $DB->get_in_or_equal($tagids);

        // Store the tags and tag instances we are going to delete.
        $tags = $DB->get_records_select('tag', 'id ' . $tagsql, $tagparams);
        $taginstances = $DB->get_records_select('tag_instance', 'tagid ' . $tagsql, $tagparams);

        // Delete all the tag instances.
        $select = 'WHERE tagid ' . $tagsql;
        $sql = "DELETE FROM {tag_instance} $select";
        $DB->execute($sql, $tagparams);

        // Delete all the tag correlations.
        $sql = "DELETE FROM {tag_correlation} $select";
        $DB->execute($sql, $tagparams);

        // Delete all the tags.
        $select = 'WHERE id ' . $tagsql;
        $sql = "DELETE FROM {tag} $select";
        $DB->execute($sql, $tagparams);

        // Fire an event that these items were untagged.
        if ($taginstances) {
            // Save the system context in case the 'contextid' column in the 'tag_instance' table is null.
            $syscontextid = context_system::instance()->id;
            // Loop through the tag instances and fire a 'tag_removed'' event.
            foreach ($taginstances as $taginstance) {
                // We can not fire an event with 'null' as the contextid.
                if (is_null($taginstance->contextid)) {
                    $taginstance->contextid = $syscontextid;
                }

                // Trigger tag removed event.
                \core\event\tag_removed::create_from_tag_instance($taginstance,
                    $tags[$taginstance->tagid]->name, $tags[$taginstance->tagid]->rawname,
                    true)->trigger();
            }
        }

        // Fire an event that these tags were deleted.
        if ($tags) {
            $context = context_system::instance();
            foreach ($tags as $tag) {
                // Delete all files associated with this tag.
                $fs = get_file_storage();
                $files = $fs->get_area_files($context->id, 'tag', 'description', $tag->id);
                foreach ($files as $file) {
                    $file->delete();
                }

                // Trigger an event for deleting this tag.
                $event = \core\event\tag_deleted::create(array(
                    'objectid' => $tag->id,
                    'relateduserid' => $tag->userid,
                    'context' => $context,
                    'other' => array(
                        'name' => $tag->name,
                        'rawname' => $tag->rawname
                    )
                ));
                $event->add_record_snapshot('tag', $tag);
                $event->trigger();
            }
        }

        return true;
    }
975714
def workflow_remove_tags(object_id, input_params={}, always_retry=True, **kwargs):
    
    return DXHTTPRequest('/%s/removeTags' % object_id, input_params, always_retry=always_retry, **kwargs)
257466
def features_tags_parse_str_to_dict(obj):
    
    features = obj['features']
    for i in tqdm(range(len(features))):
        tags = features[i]['properties'].get('tags')
        if tags is not None:
            try:
                tags = json.loads("{" + tags.replace("=>", ":") + "}")
            except:
                try:
                    tags = eval("{" + tags.replace("=>", ":") + "}")
                except:
                    tags = None
        if type(tags) == dict:
            features[i]['properties']['tags'] = {k:tags[k] for k in tags}
        elif tags is None and 'tags' in features[i]['properties']:
            del features[i]['properties']['tags']
    return obj