Set the dataset to be of type requestable or not

        Args:
            requestable (bool): Set whether dataset is requestable. Defaults to True.

        Returns:
            None
161451
def set_requestable(self, requestable=True):
        # type: (bool) -> None
        
        self.data['is_requestdata_type'] = requestable
        if requestable:
            self.data['private'] = False
1267406
def queryset(self, request, queryset):
        
        if self.value() is not None:
            return queryset.filter(information__type__pk=self.value())
        else:
            return queryset
92416
def accepted(self):
        
        model = self._previewTableView.model()
        if model is not None:
            df = model.dataFrame().copy()
            dfModel = DataFrameModel(df)
            self.load.emit(dfModel, self._filename)
            print(("Emitted model for {}".format(self._filename)))
        self._resetWidgets()
        self.accept()
1264821
def edit_dataset_metadata(request, dataset_id=None):
    
    if request.method == 'POST':
        return add_dataset(request, dataset_id)

    elif request.method == 'GET':
        # create a blank form
        # Edit
        if dataset_id:
            metadata_form = DatasetUploadForm(
                instance=get_object_or_404(Dataset, pk=dataset_id)
            )
        # Upload
        else:
            metadata_form = DatasetUploadForm()

        return render(
            request,
            'datafreezer/upload.html',
            {
                'fileUploadForm': metadata_form,
            }
        )
266452
def datasets(self, visible=True):
        
        if visible is not None:
            return filter(lambda x: x.isVisible(), self._datasets)
        return self._datasets[:]
1281924
def sent_request(self, value):
        
        if value == self._defaults['sentRequest'] and 'sentRequest' in self._values:
            del self._values['sentRequest']
        else:
            self._values['sentRequest'] = value
1068742
protected boolean checkResourceRequestType(
      List<ResourceRequest> requestList) {
    for (ResourceRequest req: requestList) {
      if (!legalTypeSet.contains(req.type)) {
        return false;
      }
    }
    return true;
  }
1264651
def set_permission(self, dataset_identifier, permission="private", content_type="json"):
        '''
        

        '''
        resource = _format_old_api_request(dataid=dataset_identifier, content_type=content_type)

        params = {
            "method": "setPermission",
            "value": "public.read" if permission == "public" else permission
        }

        return self._perform_request("put", resource, params=params)
47615
def check_method_allowed(cls, request):
        
        if not request.method in cls._meta.allowed_methods:
            raise HttpError(
                'Method \'%s\' not allowed on this resource.' % request.method,
                status=status.HTTP_405_METHOD_NOT_ALLOWED)
813785
def _validate_dataset(dataset):
    
    if not (isinstance(dataset, _SFrame)):
        raise TypeError("Input 'dataset' must be an SFrame.")

    if dataset.num_rows() == 0 or dataset.num_columns() == 0:
        raise ValueError("Input 'dataset' has no data.")
1015246
def update_allowed(self):
        
        return self.update_action.allowed(self.column.table.request,
                                          self.datum,
                                          self)
1282700
def filter(self, **kwargs):
    # @TODO refactor with models as dicts
    
    f_field = kwargs.keys()[0]
    f_value = kwargs[f_field]
    _newset = []
    
    for m in self._dataset:
      if hasattr(m, f_field):
        if getattr(m, f_field) == f_value:
          _newset.append(m)
    self._dataset = _newset
    return self
1297839
def _is_range_request_processable(self, environ):
        
        return (
            "HTTP_IF_RANGE" not in environ
            or not is_resource_modified(
                environ,
                self.headers.get("etag"),
                None,
                self.headers.get("last-modified"),
                ignore_if_range=False,
            )
        ) and "HTTP_RANGE" in environ
864671
def dataset(self, **kwargs):
        
        kwargs_copy = self.base_dict.copy()
        kwargs_copy.update(**kwargs)
        self._replace_none(kwargs_copy)
        try:
            return NameFactory.dataset_format.format(**kwargs_copy)
        except KeyError:
            return None
388381
def where(options={})
      options.merge!(key: @api_key, vintage: @api_vintage)
      fail "Client requires a dataset (#{DATASETS})." if @dataset.nil?
      [:fields, :level].each do |f|
        fail ArgumentError, "#{f} is a requied parameter" if options[f].nil?
      end
      options[:within] = [options[:within]] unless options[:within].nil?
      Request.find(dataset, options)
    end
898269
def set_dirty(self, dirty):
        

        # Complain if 'dirty' isn't boolean
        if not isinstance(dirty, bool):
            raise ValueError("'dirty' must be Boolean")
        ## end if

        # Try to retrieve the dataset; complain if repo not bound.
        try:
            dset = self._repo.require_dataset(self.N_dirty, \
                                shape=(), dtype=bool)
        except AttributeError:
            raise RErr(RErr.STATUS,
                        "Cannot set dirty status; no repository open", "")
        ## end try

        # Change the value to the indicated value
        dset[()] = dirty
940135
def runSearchDatasets(self, request):
        
        return self.runSearchRequest(
            request, protocol.SearchDatasetsRequest,
            protocol.SearchDatasetsResponse,
            self.datasetsGenerator)