Search Options

Results per page
Sort
Preferred Languages
Advance

Results 31 - 40 of 242 for get_attr (0.32 sec)

  1. pkg/registry/core/event/strategy.go

    	return nil
    }
    
    func (eventStrategy) AllowUnconditionalUpdate() bool {
    	return true
    }
    
    // GetAttrs returns labels and fields of a given object for filtering purposes.
    func GetAttrs(obj runtime.Object) (labels.Set, fields.Set, error) {
    	event, ok := obj.(*api.Event)
    	if !ok {
    		return nil, nil, fmt.Errorf("not an event")
    	}
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu Feb 10 19:01:45 UTC 2022
    - 4.8K bytes
    - Viewed (0)
  2. docs/debugging/xattr/main.go

    var (
    	path, name string
    	value      uint64
    	set, list  bool
    )
    
    func getxattr(path, name string) (uint64, error) {
    	buf, err := xattr.LGet(path, name)
    	if err != nil {
    		return 0, err
    	}
    
    	return binary.LittleEndian.Uint64(buf[:8]), nil
    }
    
    func listxattr(path string) ([]string, error) {
    	return xattr.LList(path)
    }
    
    func setxattr(path, name string, value uint64) error {
    	data := make([]byte, 8)
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Fri Dec 29 23:52:41 UTC 2023
    - 3.2K bytes
    - Viewed (0)
  3. pkg/registry/resource/podschedulingcontext/strategy.go

    func Match(label labels.Selector, field fields.Selector) storage.SelectionPredicate {
    	return storage.SelectionPredicate{
    		Label:    label,
    		Field:    field,
    		GetAttrs: GetAttrs,
    	}
    }
    
    // GetAttrs returns labels and fields of a given object for filtering purposes.
    func GetAttrs(obj runtime.Object) (labels.Set, fields.Set, error) {
    	scheduling, ok := obj.(*resource.PodSchedulingContext)
    	if !ok {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Mar 05 20:39:24 UTC 2024
    - 5.6K bytes
    - Viewed (0)
  4. pkg/registry/core/secret/strategy.go

    }
    
    func dropDisabledFields(secret *api.Secret, oldSecret *api.Secret) {
    }
    
    func (strategy) AllowUnconditionalUpdate() bool {
    	return true
    }
    
    // GetAttrs returns labels and fields of a given object for filtering purposes.
    func GetAttrs(obj runtime.Object) (labels.Set, fields.Set, error) {
    	secret, ok := obj.(*api.Secret)
    	if !ok {
    		return nil, nil, fmt.Errorf("not a secret")
    	}
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon Feb 27 20:38:11 UTC 2023
    - 4.2K bytes
    - Viewed (0)
  5. tensorflow/compiler/mlir/tensorflow/ir/tf_saved_model.cc

      // Check that there are no duplicated exported_names.
      DenseMap<StringRef, Operation *> exported_name_to_op;
      for (auto &op : module) {
        auto attr = op.getAttr(exported_names_ident);
        if (!attr) continue;
        // If this verifier is called before we verify the
        // 'tf_saved_model.exported_names' attribute, then it might be invalid.
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 23.5K bytes
    - Viewed (0)
  6. pkg/registry/resource/resourceslice/strategy.go

    	slice, ok := obj.(*resource.ResourceSlice)
    	if !ok {
    		return nil, fmt.Errorf("not a ResourceSlice")
    	}
    	return []string{slice.NodeName}, nil
    }
    
    // GetAttrs returns labels and fields of a given object for filtering purposes.
    func GetAttrs(obj runtime.Object) (labels.Set, fields.Set, error) {
    	slice, ok := obj.(*resource.ResourceSlice)
    	if !ok {
    		return nil, nil, fmt.Errorf("not a ResourceSlice")
    	}
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu Mar 07 21:22:55 UTC 2024
    - 4.4K bytes
    - Viewed (0)
  7. docs_src/sql_databases_peewee/sql_app/schemas.py

    from typing import Any, List, Union
    
    import peewee
    from pydantic import BaseModel
    from pydantic.utils import GetterDict
    
    
    class PeeweeGetterDict(GetterDict):
        def get(self, key: Any, default: Any = None):
            res = getattr(self._obj, key, default)
            if isinstance(res, peewee.ModelSelect):
                return list(res)
            return res
    
    
    class ItemBase(BaseModel):
        title: str
        description: Union[str, None] = None
    
    Registered: Mon Jun 17 08:32:26 UTC 2024
    - Last Modified: Sat May 14 11:59:59 UTC 2022
    - 868 bytes
    - Viewed (0)
  8. tensorflow/compiler/mlir/tfr/ir/tfr_types.h

        std::uninitialized_copy(key.begin(), key.end(),
                                result->getTrailingObjects<StringAttr>());
        return result;
      }
    
      bool operator==(const KeyTy& attrs) const { return attrs == GetAttrs(); }
    
      KeyTy GetAttrs() const {
        return {getTrailingObjects<StringAttr>(), num_attrs};
      }
    
      unsigned num_attrs;
    };
    
    template <typename Derived>
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue Dec 05 07:17:01 UTC 2023
    - 4.1K bytes
    - Viewed (0)
  9. tensorflow/compiler/mlir/tensorflow/transforms/tfg-to-tfe.cc

            graph_func.getLoc(),
            graph_func->getAttrOfType<StringAttr>(SymbolTable::getSymbolAttrName())
                .getValue(),
            ftype);
    
        func->setAttrs(graph_func->getAttrs());
    
        llvm::SmallVector<Type> arg_types;
        llvm::SmallVector<Type> res_types;
        llvm::SmallVector<DictionaryAttr> arg_attrs;
        llvm::SmallVector<DictionaryAttr> res_attrs;
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Fri May 17 17:58:54 UTC 2024
    - 21.2K bytes
    - Viewed (0)
  10. staging/src/k8s.io/apiserver/pkg/storage/selection_predicate.go

    	Field               fields.Selector
    	GetAttrs            AttrFunc
    	IndexLabels         []string
    	IndexFields         []string
    	Limit               int64
    	Continue            string
    	AllowWatchBookmarks bool
    }
    
    // Matches returns true if the given object's labels and fields (as
    // returned by s.GetAttrs) match s.Label and s.Field. An error is
    // returned if s.GetAttrs fails.
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Jun 04 09:20:10 UTC 2024
    - 5.6K bytes
    - Viewed (0)
Back to top