Search Options

Results per page
Sort
Preferred Languages
Advance

Results 111 - 120 of 2,311 for yield (0.04 sec)

  1. tests/test_tutorial/test_events/test_tutorial001.py

    from fastapi.testclient import TestClient
    
    
    @pytest.fixture(name="app", scope="module")
    def get_app():
        with pytest.warns(DeprecationWarning):
            from docs_src.events.tutorial001 import app
        yield app
    
    
    def test_events(app: FastAPI):
        with TestClient(app) as client:
            response = client.get("/items/foo")
            assert response.status_code == 200, response.text
    Registered: Mon Jun 17 08:32:26 UTC 2024
    - Last Modified: Wed Oct 18 12:36:40 UTC 2023
    - 3.6K bytes
    - Viewed (0)
  2. tests/test_dependency_normal_exceptions.py

    initial_state = {"except": False, "finally": False}
    
    state = initial_state.copy()
    
    app = FastAPI()
    
    
    async def get_database():
        temp_database = fake_database.copy()
        try:
            yield temp_database
            fake_database.update(temp_database)
        except HTTPException:
            state["except"] = True
            raise
        finally:
            state["finally"] = True
    
    
    Registered: Mon Jun 17 08:32:26 UTC 2024
    - Last Modified: Sat Feb 24 23:06:37 UTC 2024
    - 1.9K bytes
    - Viewed (0)
  3. docs_src/sql_databases/sql_app_py310/main.py

    from .database import SessionLocal, engine
    
    models.Base.metadata.create_all(bind=engine)
    
    app = FastAPI()
    
    
    # Dependency
    def get_db():
        db = SessionLocal()
        try:
            yield db
        finally:
            db.close()
    
    
    @app.post("/users/", response_model=schemas.User)
    def create_user(user: schemas.UserCreate, db: Session = Depends(get_db)):
    Registered: Mon Jun 17 08:32:26 UTC 2024
    - Last Modified: Fri Jan 07 14:11:31 UTC 2022
    - 1.6K bytes
    - Viewed (0)
  4. guava-testlib/test/com/google/common/testing/GcFinalizationTest.java

                  while (!shutdown.get()) {
                    interruptee.interrupt();
                    Thread.yield();
                  }
                }
              });
          this.shutdown = shutdown;
          start();
        }
    
        void shutdown() {
          shutdown.set(true);
          while (this.isAlive()) {
            Thread.yield();
          }
        }
      }
    
      void assertWrapsInterruptedException(RuntimeException e) {
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Wed Sep 06 17:04:31 UTC 2023
    - 7.4K bytes
    - Viewed (0)
  5. subprojects/core/src/main/java/org/gradle/internal/operations/notify/BuildOperationNotificationListenerRegistrar.java

    /**
     * Mechanism by which the scan plugin registers for notifications.
     * <p>
     * One instance of this exists per build tree.
     * Only one listener may register.
     * Subsequent attempts yield exceptions.
     *
     * @since 4.0
     */
    @UsedByScanPlugin("obtained from the root build's root project's service registry")
    @ServiceScope(Scope.CrossBuildSession.class)
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Thu Apr 04 06:02:18 UTC 2024
    - 1.5K bytes
    - Viewed (0)
  6. docs_src/sql_databases/sql_app/main.py

    from .database import SessionLocal, engine
    
    models.Base.metadata.create_all(bind=engine)
    
    app = FastAPI()
    
    
    # Dependency
    def get_db():
        db = SessionLocal()
        try:
            yield db
        finally:
            db.close()
    
    
    @app.post("/users/", response_model=schemas.User)
    def create_user(user: schemas.UserCreate, db: Session = Depends(get_db)):
    Registered: Mon Jun 17 08:32:26 UTC 2024
    - Last Modified: Sun May 17 10:14:14 UTC 2020
    - 1.6K bytes
    - Viewed (0)
  7. docs_src/sql_databases/sql_app_py39/main.py

    from .database import SessionLocal, engine
    
    models.Base.metadata.create_all(bind=engine)
    
    app = FastAPI()
    
    
    # Dependency
    def get_db():
        db = SessionLocal()
        try:
            yield db
        finally:
            db.close()
    
    
    @app.post("/users/", response_model=schemas.User)
    def create_user(user: schemas.UserCreate, db: Session = Depends(get_db)):
    Registered: Mon Jun 17 08:32:26 UTC 2024
    - Last Modified: Fri Jan 07 14:11:31 UTC 2022
    - 1.6K bytes
    - Viewed (0)
  8. android/guava-testlib/test/com/google/common/testing/GcFinalizationTest.java

                  while (!shutdown.get()) {
                    interruptee.interrupt();
                    Thread.yield();
                  }
                }
              });
          this.shutdown = shutdown;
          start();
        }
    
        void shutdown() {
          shutdown.set(true);
          while (this.isAlive()) {
            Thread.yield();
          }
        }
      }
    
      void assertWrapsInterruptedException(RuntimeException e) {
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Mon Jun 10 19:21:11 UTC 2024
    - 7.4K bytes
    - Viewed (0)
  9. tensorflow/compiler/mlir/tensorflow/tests/inlining.mlir

          %result_2 = "tf.StatefulPartitionedCall"() {config = "", config_proto = "", executor_type = "", f = @inline_into_island_multi_block_callee} : () -> tensor<2xi32>
    
          // CHECK-NEXT: tf_executor.yield %[[CST]], %[[CALL]]
          tf_executor.yield %result, %result_2 : tensor<2xi32>, tensor<2xi32>
        }
        tf_executor.fetch %1#1, %1#1 : tensor<2xi32>, tensor<2xi32>
      }
      func.return %0#1, %0#1 : tensor<2xi32>, tensor<2xi32>
    }
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Mon Oct 30 06:52:55 UTC 2023
    - 7.2K bytes
    - Viewed (0)
  10. tensorflow/compiler/mlir/lite/tests/mlir2flatbuffer/while_op.mlir

        %1 = func.call @cond(%arg2, %arg3) : (tensor<*xi32>, tensor<*xf32>) -> tensor<i1>
        "tfl.yield"(%1) : (tensor<i1>) -> ()
      },  {
      ^bb0(%arg2: tensor<*xi32>, %arg3: tensor<*xf32>):
        %1:2 = func.call @body(%arg2, %arg3) : (tensor<*xi32>, tensor<*xf32>) -> (tensor<*xi32>, tensor<*xf32>)
        "tfl.yield"(%1#0, %1#1) : (tensor<*xi32>, tensor<*xf32>) -> ()
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Jul 14 16:41:28 UTC 2022
    - 7.5K bytes
    - Viewed (0)
Back to top