Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 1,171 for context_a (0.21 sec)

  1. tests/test_dependency_contextmanager.py

    
    async def context_a(state: dict = Depends(get_state)):
        state["context_a"] = "started a"
        try:
            yield state
        finally:
            state["context_a"] = "finished a"
    
    
    async def context_b(state: dict = Depends(context_a)):
        state["context_b"] = "started b"
        try:
            yield state
        finally:
            state["context_b"] = f"finished b with a: {state['context_a']}"
    
    
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Sat Feb 24 23:06:37 GMT 2024
    - 11.6K bytes
    - Viewed (0)
  2. istioctl/pkg/cli/context.go

    import (
    	corev1 "k8s.io/api/core/v1"
    	"k8s.io/apimachinery/pkg/runtime"
    	"k8s.io/client-go/rest"
    
    	"istio.io/istio/istioctl/pkg/util/handlers"
    	"istio.io/istio/pkg/kube"
    	"istio.io/istio/pkg/ptr"
    )
    
    type Context interface {
    	// CLIClient returns a client for the default revision
    	CLIClient() (kube.CLIClient, error)
    	// CLIClientWithRevision returns a client for the given revision
    	CLIClientWithRevision(rev string) (kube.CLIClient, error)
    Go
    - Registered: Wed May 01 22:53:12 GMT 2024
    - Last Modified: Tue Apr 02 08:32:06 GMT 2024
    - 6.4K bytes
    - Viewed (0)
  3. internal/kms/context.go

    package kms
    
    import (
    	"bytes"
    	"sort"
    	"unicode/utf8"
    )
    
    // Context is a set of key-value pairs that
    // are associated with a generate data encryption
    // key (DEK).
    //
    // A KMS implementation may bind the context to the
    // generated DEK such that the same context must be
    // provided when decrypting an encrypted DEK.
    type Context map[string]string
    
    // MarshalText returns a canonical text representation of
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Sun Jan 02 17:15:06 GMT 2022
    - 6K bytes
    - Viewed (0)
  4. tensorflow/c/eager/abstract_context.h

    ==============================================================================*/
    #ifndef TENSORFLOW_C_EAGER_ABSTRACT_CONTEXT_H_
    #define TENSORFLOW_C_EAGER_ABSTRACT_CONTEXT_H_
    
    #include <memory>
    
    #include "tensorflow/c/eager/abstract_function.h"
    #include "tensorflow/c/eager/abstract_operation.h"
    
    namespace tensorflow {
    
    // Abstract interface to a context.
    //
    // This serves as a factory for creating `AbstractOperation`s and for
    C
    - Registered: Tue Apr 30 12:39:09 GMT 2024
    - Last Modified: Sun Oct 24 11:16:58 GMT 2021
    - 3K bytes
    - Viewed (0)
  5. tensorflow/c/experimental/gradients/tape/tape_context.h

    limitations under the License.
    ==============================================================================*/
    #ifndef TENSORFLOW_C_EXPERIMENTAL_GRADIENTS_TAPE_TAPE_CONTEXT_H_
    #define TENSORFLOW_C_EXPERIMENTAL_GRADIENTS_TAPE_TAPE_CONTEXT_H_
    
    #include "tensorflow/c/eager/abstract_context.h"
    #include "tensorflow/c/experimental/gradients/tape/tape_operation.h"
    
    namespace tensorflow {
    namespace gradients {
    C
    - Registered: Tue Feb 27 12:39:08 GMT 2024
    - Last Modified: Wed Sep 23 23:12:39 GMT 2020
    - 1.6K bytes
    - Viewed (0)
  6. tensorflow/c/experimental/gradients/tape/tape_context.cc

    limitations under the License.
    ==============================================================================*/
    #include "tensorflow/c/experimental/gradients/tape/tape_context.h"
    
    #include "tensorflow/c/eager/abstract_context.h"
    #include "tensorflow/c/experimental/gradients/tape/tape_operation.h"
    
    namespace tensorflow {
    namespace gradients {
    TapeContext::TapeContext(AbstractContext* c, Tape* tape,
    C++
    - Registered: Tue Feb 27 12:39:08 GMT 2024
    - Last Modified: Wed Sep 23 23:12:39 GMT 2020
    - 1.7K bytes
    - Viewed (0)
  7. tensorflow/c/eager/tfe_context_internal.h

    // the TFE_Context structure.
    typedef struct TFE_Context TFE_Context;
    
    namespace tensorflow {
    
    DEFINE_CONVERSION_FUNCTIONS(tensorflow::ImmediateExecutionContext, TFE_Context);
    
    }  // namespace tensorflow
    
    C
    - Registered: Tue Apr 30 12:39:09 GMT 2024
    - Last Modified: Wed Jun 17 19:39:13 GMT 2020
    - 1.4K bytes
    - Viewed (0)
  8. tensorflow/c/eager/immediate_execution_context.h

    #ifndef TENSORFLOW_C_EAGER_IMMEDIATE_EXECUTION_CONTEXT_H_
    #define TENSORFLOW_C_EAGER_IMMEDIATE_EXECUTION_CONTEXT_H_
    
    #include <functional>
    #include <map>
    #include <memory>
    #include <vector>
    
    #include "absl/types/optional.h"
    #include "absl/types/span.h"
    #include "tensorflow/c/eager/abstract_context.h"
    #include "tensorflow/c/eager/immediate_execution_distributed_manager.h"
    C
    - Registered: Tue Apr 30 12:39:09 GMT 2024
    - Last Modified: Thu Jul 06 08:34:00 GMT 2023
    - 12.3K bytes
    - Viewed (0)
  9. tests/test_dependency_contextvars.py

    from contextvars import ContextVar
    from typing import Any, Awaitable, Callable, Dict, Optional
    
    from fastapi import Depends, FastAPI, Request, Response
    from fastapi.testclient import TestClient
    
    legacy_request_state_context_var: ContextVar[Optional[Dict[str, Any]]] = ContextVar(
        "legacy_request_state_context_var", default=None
    )
    
    app = FastAPI()
    
    
    async def set_up_request_state_dependency():
        request_state = {"user": "deadpond"}
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Feb 17 12:40:12 GMT 2022
    - 1.5K bytes
    - Viewed (0)
  10. istioctl/pkg/cli/context_test.go

    Xiaopeng Han <******@****.***> 1686334669 +0800
    Go
    - Registered: Wed May 01 22:53:12 GMT 2024
    - Last Modified: Fri Jun 09 18:17:49 GMT 2023
    - 1.4K bytes
    - Viewed (0)
Back to top