Delete an event's matches on The Blue Alliance.

        :param data: List of match keys to delete, can be ommited if you would like to delete all matches.
175867
def delete_event_matches(self, data=None):
        
        return self._post('event/%s/matches/delete_all' if data is None else 'event/%s/matches/delete', json.dumps(self.event_key) if data is None else json.dumps(data))
80055
public function RemoveAnnouncements($Data) {
      $Result =& $Data->Result();
      $Unset = FALSE;
      
      foreach($Result as $Key => &$Discussion) {
         if (isset($this->_AnnouncementIDs)) {
            if (in_array($Discussion->DiscussionID, $this->_AnnouncementIDs)) {
               unset($Result[$Key]);
               $Unset = TRUE;
            }
         } elseif ($Discussion->Announce && $Discussion->Dismissed == 0) {
            // Unset discussions that are announced and not dismissed
            unset($Result[$Key]);
            $Unset = TRUE;
         }
      }
      if ($Unset) {
         // Make sure the discussions are still in order for json encoding.
         $Result = array_values($Result);
      }
   }
1226260
public void delete(ValidationData pData) {
        this.datas.remove(this.findById(pData.getId()));
        this.indexMap.removeIndex(pData);
    }
942215
public String delete_attribute(Map<String, Object> data) {
        String type = data.get("type").toString();
        Gson gson = new Gson();
        String json = gson.toJson(data);
        return post("attribute/" + type, json);
    }
723352
def delete(self, key):
        ""
        if key in self.data:
            self.delete_from_index(key)
        del self.data[key]
194920
public function delete(array $data)
  {
    foreach ($data as $key => $id)
    {
      $CostCenter = $this->byId($id);
      $CostCenter->delete();
    }
    // $this->CostCenter->destroy($data);

    return true;
  }
573649
def matches(self, client, event_data):
        """"""

        for f in self.filters:
            if not f(client, event_data):
                return False

        return True
1338164
def delete(options = {})
      return each({ match: '*', count: 500, max_iterations: 1_000_000, batch_size: 500 }.merge(options)) do |keys|
        @connection.del(*keys)
      end
    end
1168215
public function clear_attempt($data) {
        global $DB;

        foreach ($data['criteria'] as $criterionid => $record) {
            $DB->delete_records('gradingform_rubric_fillings',
                array('criterionid' => $criterionid, 'instanceid' => $this->get_id()));
        }
    }
111533
def process_key_event(self, event_data):
        '''
        
        '''

        tag = event_data['tag']
        event_info = event_data['data']

        if event_info['act'] == 'delete':
            self.minions.pop(event_info['id'], None)
        elif event_info['act'] == 'accept':
            self.minions.setdefault(event_info['id'], {})

        self.publish_minions()
392135
def unlink(client, name, include, exclude, yes):
    """"""
    dataset = client.load_dataset(name=name)
    records = _filter(
        client, names=[dataset.name], include=include, exclude=exclude
    )

    if not yes and records:
        prompt_text = (
            'You are about to remove '
            'following from "{0}" dataset.\n'.format(dataset.name) +
            '\n'.join([str(record.full_path)
                       for record in records]) + '\nDo you wish to continue?'
        )
        click.confirm(WARNING + prompt_text, abort=True)

    if records:
        for item in records:
            dataset.unlink_file(item.path)

        dataset.to_yaml()
        click.secho('OK', fg='green')
345651
def delete(self, dataset_identifier, row_id=None, content_type="json"):
        '''
        
        '''
        if row_id:
            resource = _format_new_api_request(dataid=dataset_identifier, row_id=row_id,
                                               content_type=content_type)
        else:
            resource = _format_old_api_request(dataid=dataset_identifier,
                                               content_type=content_type)

        return self._perform_request("delete", resource)
928563
def delete(self, dataset):
        """"""

        url = self._get_url('/api/1.0/meta/dataset/{}/delete'.format(dataset))

        json_data = ''
        binary_data = json_data.encode()

        headers = self._get_request_headers()
        req = urllib.request.Request(url, binary_data, headers)
        resp = urllib.request.urlopen(req)   
        str_response = resp.read().decode('utf-8')
        if str_response != '"successful"' or resp.status < 200 or resp.status >= 300:
            msg = 'Dataset has not been deleted, because of the following error(s): {}'.format(str_response)
            raise ValueError(msg)
1142186
private void deleteRelation(Object connection, EntityMetadata entityMetadata, String rowKey)
    {
        List<String> relations = entityMetadata.getRelationNames();

        if (relations != null)
        {
            for (String relation : relations)
            {
                if (resource != null && resource.isActive())
                {
                    ((Transaction) connection).hdel(getHashKey(entityMetadata.getTableName(), rowKey), relation);

                }
                else
                {
                    ((Pipeline) connection).hdel(getHashKey(entityMetadata.getTableName(), rowKey), relation);

                }
            }

        }
        /*
         * Response<Map<String, String>> fields = null; if (resource != null &&
         * resource.isActive()) { fields = ((Transaction)
         * connection).hgetAll(getHashKey(entityMetadata.getTableName(),
         * rowKey)); if (connection != null) { ((Pipeline) connection).sync(); }
         * for (String field : fields.get().keySet()) { ((Transaction)
         * connection).hdel(getHashKey(entityMetadata.getTableName(), rowKey),
         * field); } } else { fields = ((Pipeline)
         * connection).hgetAll(getHashKey(entityMetadata.getTableName(),
         * rowKey)); if (connection != null) { ((Pipeline) connection).sync(); }
         * for (String field : fields.get().keySet()) { ((Pipeline)
         * connection).hdel(getHashKey(entityMetadata.getTableName(), rowKey),
         * field); } }
         */
    }
1342541
def _delete_gridfs_data(self, data):
        
        if isinstance(data, ObjectId):
            if self._gridfs.exists({"_id": data}):
                self._gridfs.delete(data)
            else:
                raise DataStoreGridfsIdInvalid()
        elif isinstance(data, list):
            for item in data:
                self._delete_gridfs_data(item)
        elif isinstance(data, dict):
            for key, item in data.items():
                self._delete_gridfs_data(item)
377069
def on_remove(self, widget, data=None):
        
        treeiter, path = self.get_selected_object()
        if not treeiter:
            return

        # check if an element is selected
        dict_path_as_list = self.tree_store[path][self.ID_STORAGE_ID]
        logger.debug("Deleting semantic data entry with name {}!".format(dict_path_as_list[-1]))
        self.model.state.remove_semantic_data(dict_path_as_list)
        self.reload_tree_store_data()

        # hold cursor position where the last element was removed
        try:
            self.select_entry(self.tree_store[path][self.ID_STORAGE_ID])
        except IndexError:
            if len(self.tree_store):
                if len(path) > 1:
                    possible_before_path = tuple(list(path[:-1]) + [path[-1] - 1])
                    if possible_before_path[-1] > -1:
                        self.select_entry(self.tree_store[possible_before_path][self.ID_STORAGE_ID])
                    else:
                        self.select_entry(self.tree_store[path[:-1]][self.ID_STORAGE_ID])
                else:
                    self.select_entry(self.tree_store[path[0] - 1][self.ID_STORAGE_ID])
        return True
532548
def delete(self, key):
        
        data = None
        if key is not None:
            data = self.db.delete(key.strip())
        else:
            self.tcex.log.warning(u'The key field was None.')
        return data