- Sort Score
- Result 10 results
- Languages All
Results 131 - 140 of 4,317 for Yield (0.12 sec)
-
docs_src/dependencies/tutorial008b.py
"portal-gun": {"description": "Gun to create portals", "owner": "Rick"}, } class OwnerError(Exception): pass def get_username(): try: yield "Rick" except OwnerError as e: raise HTTPException(status_code=400, detail=f"Owner error: {e}") @app.get("/items/{item_id}") def get_item(item_id: str, username: str = Depends(get_username)):
Registered: Mon Jun 17 08:32:26 UTC 2024 - Last Modified: Tue Dec 26 20:37:34 UTC 2023 - 735 bytes - Viewed (0) -
docs_src/dependencies/tutorial008d_an.py
from fastapi import Depends, FastAPI, HTTPException from typing_extensions import Annotated app = FastAPI() class InternalError(Exception): pass def get_username(): try: yield "Rick" except InternalError: print("We don't swallow the internal error here, we raise again 😎") raise @app.get("/items/{item_id}") def get_item(item_id: str, username: Annotated[str, Depends(get_username)]):
Registered: Mon Jun 17 08:32:26 UTC 2024 - Last Modified: Sat Feb 24 23:06:37 UTC 2024 - 744 bytes - Viewed (0) -
docs_src/dependencies/tutorial008b_an_py39.py
"portal-gun": {"description": "Gun to create portals", "owner": "Rick"}, } class OwnerError(Exception): pass def get_username(): try: yield "Rick" except OwnerError as e: raise HTTPException(status_code=400, detail=f"Owner error: {e}") @app.get("/items/{item_id}") def get_item(item_id: str, username: Annotated[str, Depends(get_username)]):
Registered: Mon Jun 17 08:32:26 UTC 2024 - Last Modified: Tue Dec 26 20:37:34 UTC 2023 - 775 bytes - Viewed (0) -
docs_src/dependencies/tutorial008d_an_py39.py
from typing import Annotated from fastapi import Depends, FastAPI, HTTPException app = FastAPI() class InternalError(Exception): pass def get_username(): try: yield "Rick" except InternalError: print("We don't swallow the internal error here, we raise again 😎") raise @app.get("/items/{item_id}") def get_item(item_id: str, username: Annotated[str, Depends(get_username)]):
Registered: Mon Jun 17 08:32:26 UTC 2024 - Last Modified: Sat Feb 24 23:06:37 UTC 2024 - 734 bytes - Viewed (0) -
tensorflow/compiler/mlir/tensorflow/tests/freeze_variables.mlir
%0 = "tf.IfRegion"(%arg0) ({ %1 = "tf.ReadVariableOp"(%handle) : (tensor<!tf_type.resource<tensor<0xf32>>>) -> (tensor<0xf32>) "tf.Yield"(%1) : (tensor<0xf32>) -> () }, { %2 = "tf.Const"() {value = dense<1.0> : tensor<0xf32>} : () -> tensor<0xf32> "tf.Yield"(%2) : (tensor<0xf32>) -> () }) {is_stateless = true} : (tensor<i1>) -> (tensor<0xf32>) func.return %0 : tensor<0xf32> } }
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Mon Oct 30 06:52:55 UTC 2023 - 23.6K bytes - Viewed (0) -
docs_src/dependencies/tutorial008b_an.py
"portal-gun": {"description": "Gun to create portals", "owner": "Rick"}, } class OwnerError(Exception): pass def get_username(): try: yield "Rick" except OwnerError as e: raise HTTPException(status_code=400, detail=f"Owner error: {e}") @app.get("/items/{item_id}") def get_item(item_id: str, username: Annotated[str, Depends(get_username)]):
Registered: Mon Jun 17 08:32:26 UTC 2024 - Last Modified: Tue Dec 26 20:37:34 UTC 2023 - 785 bytes - Viewed (0) -
docs_src/sql_databases/sql_app_py39/tests/test_sql_app.py
) TestingSessionLocal = sessionmaker(autocommit=False, autoflush=False, bind=engine) Base.metadata.create_all(bind=engine) def override_get_db(): try: db = TestingSessionLocal() yield db finally: db.close() app.dependency_overrides[get_db] = override_get_db client = TestClient(app) def test_create_user(): response = client.post( "/users/",
Registered: Mon Jun 17 08:32:26 UTC 2024 - Last Modified: Fri Jan 07 14:11:31 UTC 2022 - 1.2K bytes - Viewed (0) -
tensorflow/compiler/mlir/tensorflow/transforms/tf_passes.td
"tf.IfRegion"(%0) ( { %2 = "tf.A"() : () -> (tensor<f32>) "tf.Yield"() : () -> () }, { "tf.Yield"() : () -> () }) { is_stateless = true } : (tensor<i1>) -> () "tf.IfRegion"(%0) ( { %2 = "tf.B"() : () -> (tensor<f32>) "tf.Yield"() : () -> () }, { "tf.Yield"() : () -> () }) { is_stateless = true } : (tensor<i1>) -> () ```
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Wed Jun 12 21:18:05 UTC 2024 - 99.6K bytes - Viewed (0) -
tensorflow/compiler/mlir/tensorflow/transforms/executor_tpuv1_outline_tpu_island.cc
SmallVector<Type, 16> func_operand_types; func_operand_types.reserve(operands.size()); for (Value operand : operands) func_operand_types.push_back(operand.getType()); // Function results are the yield operands SmallVector<Type, 16> func_result_types; for (Value operand : island_op.GetYield().getOperands()) func_result_types.push_back(operand.getType()); FunctionType func_type =
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Apr 25 16:01:03 UTC 2024 - 8.7K bytes - Viewed (0) -
docs_src/sql_databases/sql_app/tests/test_sql_app.py
) TestingSessionLocal = sessionmaker(autocommit=False, autoflush=False, bind=engine) Base.metadata.create_all(bind=engine) def override_get_db(): try: db = TestingSessionLocal() yield db finally: db.close() app.dependency_overrides[get_db] = override_get_db client = TestClient(app) def test_create_user(): response = client.post( "/users/",
Registered: Mon Jun 17 08:32:26 UTC 2024 - Last Modified: Thu Jun 22 11:20:12 UTC 2023 - 1.2K bytes - Viewed (0)