Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 470 for contextos (0.1 sec)

  1. docs/pt/docs/tutorial/dependencies/dependencies-with-yield.md

    ## Gerenciadores de contexto
    
    ### O que são gerenciadores de contexto
    
    "Gerenciadores de Contexto" são qualquer um dos objetos Python que podem ser utilizados com a declaração `with`.
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 15.5K bytes
    - Viewed (0)
  2. 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']}"
    
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sat Aug 17 04:13:50 UTC 2024
    - 11.6K bytes
    - Viewed (0)
  3. tensorflow/c/eager/immediate_execution_distributed_manager.h

      // Set up distributed execution environment on local and remote tasks.
      // When `reset_context` is true, initialize new cluster context state based
      // on cluster configurations provided in `server_def`; otherwise, update
      // existing context state with the provided `server_def`. Contexts created
      // on remote tasks will be considered stale and garbage collected after
      // `keep_alive_secs` of inactivity.
    Registered: Tue Nov 05 12:39:12 UTC 2024
    - Last Modified: Sat Oct 12 05:11:17 UTC 2024
    - 2.9K bytes
    - Viewed (0)
  4. cmd/api-response.go

    			content.StorageClass = filterStorageClass(ctx, object.StorageClass)
    		} else {
    			content.StorageClass = globalMinioDefaultStorageClass
    		}
    		content.Owner = owner
    		contents = append(contents, content)
    	}
    	data.Name = bucket
    	data.Contents = contents
    
    	data.EncodingType = encodingType
    	data.Prefix = s3EncodeName(prefix, encodingType)
    	data.Marker = s3EncodeName(marker, encodingType)
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Thu Oct 31 19:27:06 UTC 2024
    - 33.4K bytes
    - Viewed (0)
  5. src/cmd/api/main_test.go

    			t.Fatal(err)
    		}
    		nextFiles = next
    	}
    
    	for _, c := range contexts {
    		c.Compiler = build.Default.Compiler
    	}
    
    	walkers := make([]*Walker, len(contexts))
    	var wg sync.WaitGroup
    	for i, context := range contexts {
    		i, context := i, context
    		wg.Add(1)
    		go func() {
    			defer wg.Done()
    			walkers[i] = NewWalker(context, filepath.Join(testenv.GOROOT(t), "src"))
    		}()
    	}
    	wg.Wait()
    
    Registered: Tue Nov 05 11:13:11 UTC 2024
    - Last Modified: Wed Sep 04 18:16:59 UTC 2024
    - 31.4K bytes
    - Viewed (0)
  6. cmd/warm-backend-s3.go

    	})
    	return remoteVersionID(res.VersionID), s3.ToObjectError(err, object)
    }
    
    func (s3 *warmBackendS3) Put(ctx context.Context, object string, r io.Reader, length int64) (remoteVersionID, error) {
    	return s3.PutWithMeta(ctx, object, r, length, map[string]string{})
    }
    
    func (s3 *warmBackendS3) Get(ctx context.Context, object string, rv remoteVersionID, opts WarmBackendGetOpts) (io.ReadCloser, error) {
    	gopts := minio.GetObjectOptions{}
    
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Thu Oct 31 22:10:24 UTC 2024
    - 5.7K bytes
    - Viewed (0)
  7. tensorflow/c/eager/c_api.cc

    }
    
    namespace tensorflow {
    namespace {
    class CustomDeviceAPI : public tensorflow::CustomDevice {
     public:
      CustomDeviceAPI(TFE_Context* context, TFE_CustomDevice device, void* info,
                      string name)
          : context_(context), device_(device), info_(info), name_(name) {}
    
      ~CustomDeviceAPI() override { device_.delete_device(info_); }
    
      const string& name() override { return name_; }
    
    Registered: Tue Nov 05 12:39:12 UTC 2024
    - Last Modified: Sat Oct 12 05:11:17 UTC 2024
    - 43.9K bytes
    - Viewed (0)
  8. tensorflow/c/eager/parallel_device/parallel_device_lib.cc

            op_outputs_ = std::vector<TensorHandlePtr>();
            Execute(context_, operation_name_, std::move(op_inputs_), attributes_,
                    expected_max_outputs_, &op_outputs_, status_.get());
            execution_state_ = ExecutionState::kHasResult;
          }
        }
        finished_execute_.notify_one();
      }
    }
    
    void DeviceThread::StartExecute(TFE_Context* context,
                                    const char* operation_name,
    Registered: Tue Nov 05 12:39:12 UTC 2024
    - Last Modified: Mon Oct 21 04:14:14 UTC 2024
    - 25.9K bytes
    - Viewed (0)
  9. internal/grid/handlers.go

    	return val
    }
    
    func setCaller(ctx context.Context, cl *RemoteClient) context.Context {
    	//nolint:staticcheck // SA1029 Staticcheck is drunk.
    	return context.WithValue(ctx, ctxCallerKey{}, cl)
    }
    
    func setSubroute(ctx context.Context, s string) context.Context {
    	//nolint:staticcheck // SA1029 Staticcheck is drunk.
    	return context.WithValue(ctx, ctxSubrouteKey{}, s)
    }
    
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Mon Sep 09 16:58:30 UTC 2024
    - 27.7K bytes
    - Viewed (0)
  10. docs/en/docs/tutorial/dependencies/dependencies-with-yield.md

    ```Python
    with open("./somefile.txt") as f:
        contents = f.read()
        print(contents)
    ```
    
    Underneath, the `open("./somefile.txt")` creates an object that is called a "Context Manager".
    
    When the `with` block finishes, it makes sure to close the file, even if there were exceptions.
    
    When you create a dependency with `yield`, **FastAPI** will internally create a context manager for it, and combine it with some other related tools.
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 14K bytes
    - Viewed (0)
Back to top