Search Options

Results per page
Sort
Preferred Languages
Advance

Results 51 - 60 of 855 for SELF (0.04 sec)

  1. tests/test_custom_middleware_exception.py

                    )
                return message
    
            return inner
    
        async def __call__(self, scope, receive, send):
            if scope["type"] != "http" or self.max_content_size is None:
                await self.app(scope, receive, send)
                return
    
            wrapper = self.receive_wrapper(receive)
            await self.app(scope, wrapper, send)
    
    
    @router.post("/middleware")
    Registered: Mon Jun 17 08:32:26 UTC 2024
    - Last Modified: Thu Aug 25 21:44:40 UTC 2022
    - 2.8K bytes
    - Viewed (0)
  2. docs_src/websockets/tutorial003.py

    """
    
    
    class ConnectionManager:
        def __init__(self):
            self.active_connections: List[WebSocket] = []
    
        async def connect(self, websocket: WebSocket):
            await websocket.accept()
            self.active_connections.append(websocket)
    
        def disconnect(self, websocket: WebSocket):
            self.active_connections.remove(websocket)
    
        async def send_personal_message(self, message: str, websocket: WebSocket):
    Registered: Mon Jun 17 08:32:26 UTC 2024
    - Last Modified: Sun Aug 09 13:52:19 UTC 2020
    - 2.5K bytes
    - Viewed (0)
  3. tensorflow/compiler/mlir/tfr/integration/node_expansion_test.py

        self.assertAllEqual(sq3.numpy().reshape(-1), [3, 6, 9, 12])
    
      def testBiasedDense(self):
        t1 = constant_op.constant([[1.0, 2.0], [3.0, 4.0]])
        t2 = constant_op.constant([[1.0, 2.0], [3.0, 4.0]])
        t3 = constant_op.constant([[-10.0, -10.0], [-10.0, -10.0]])
        sq = gen_composite_ops.my_biased_dense(t1, t2, t3)
        self.assertAllEqual(sq.numpy().reshape(-1), [-3, 0, 5, 12])
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue Sep 28 21:37:05 UTC 2021
    - 3.9K bytes
    - Viewed (0)
  4. fastapi/params.py

    class Depends:
        def __init__(
            self, dependency: Optional[Callable[..., Any]] = None, *, use_cache: bool = True
        ):
            self.dependency = dependency
            self.use_cache = use_cache
    
        def __repr__(self) -> str:
            attr = getattr(self.dependency, "__name__", type(self.dependency).__name__)
            cache = "" if self.use_cache else ", use_cache=False"
            return f"{self.__class__.__name__}({attr}{cache})"
    
    
    Registered: Mon Jun 17 08:32:26 UTC 2024
    - Last Modified: Thu Apr 18 19:40:57 UTC 2024
    - 27.5K bytes
    - Viewed (0)
  5. docs_src/dependencies/tutorial003_py310.py

    app = FastAPI()
    
    
    fake_items_db = [{"item_name": "Foo"}, {"item_name": "Bar"}, {"item_name": "Baz"}]
    
    
    class CommonQueryParams:
        def __init__(self, q: str | None = None, skip: int = 0, limit: int = 100):
            self.q = q
            self.skip = skip
            self.limit = limit
    
    
    @app.get("/items/")
    async def read_items(commons=Depends(CommonQueryParams)):
        response = {}
        if commons.q:
    Registered: Mon Jun 17 08:32:26 UTC 2024
    - Last Modified: Fri Jan 07 14:11:31 UTC 2022
    - 603 bytes
    - Viewed (0)
  6. fastapi/security/open_id_connect_url.py

                    """
                ),
            ] = True,
        ):
            self.model = OpenIdConnectModel(
                openIdConnectUrl=openIdConnectUrl, description=description
            )
            self.scheme_name = scheme_name or self.__class__.__name__
            self.auto_error = auto_error
    
        async def __call__(self, request: Request) -> Optional[str]:
            authorization = request.headers.get("Authorization")
    Registered: Mon Jun 17 08:32:26 UTC 2024
    - Last Modified: Tue Apr 02 02:48:51 UTC 2024
    - 2.7K bytes
    - Viewed (0)
  7. docs_src/dependencies/tutorial010.py

    class MySuperContextManager:
        def __init__(self):
            self.db = DBSession()
    
        def __enter__(self):
            return self.db
    
        def __exit__(self, exc_type, exc_value, traceback):
            self.db.close()
    
    
    async def get_db():
        with MySuperContextManager() as db:
    Registered: Mon Jun 17 08:32:26 UTC 2024
    - Last Modified: Thu Mar 26 19:09:53 UTC 2020
    - 292 bytes
    - Viewed (0)
  8. tensorflow/compiler/mlir/tensorflow/tests/tf_saved_model/dag_object_graph.py

    class Child(tf.Module):
    
      def __init__(self):
        super(Child, self).__init__()
        self.my_variable = tf.Variable(3.)
    
    
    # Creates a dag object graph.
    # There is only one instance of `Child`, but it is reachable via two names.
    # Thus, self.my_variable is reachable via two paths.
    class TestModule(tf.Module):
    
      def __init__(self):
        super(TestModule, self).__init__()
        self.child1 = Child()
        self.child2 = self.child1
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue Sep 28 21:37:05 UTC 2021
    - 1.5K bytes
    - Viewed (0)
  9. tensorflow/compiler/mlir/tfr/examples/pad/pad_ops_test.py

            'paddings': paddings,
            'mode': mode,
        }
        # Make sure the composition python function is correct
        self._assertOpAndComposite([input_], tf.raw_ops.MirrorPad,
                                   ops_defs._composite_mirror_pad, kwargs_, kwargs)
        # Make sure the translation and decomposition is correct
        self._assertOpAndComposite([input_],
                                   tf.function(gen_pad_ops.new_mirror_pad),
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue Sep 28 21:37:05 UTC 2021
    - 3.4K bytes
    - Viewed (0)
  10. tests/test_inherited_custom_class.py

    from .utils import needs_pydanticv1, needs_pydanticv2
    
    
    class MyUuid:
        def __init__(self, uuid_string: str):
            self.uuid = uuid_string
    
        def __str__(self):
            return self.uuid
    
        @property  # type: ignore
        def __class__(self):
            return uuid.UUID
    
        @property
        def __dict__(self):
            """Spoof a missing __dict__ by raising TypeError, this is how
    Registered: Mon Jun 17 08:32:26 UTC 2024
    - Last Modified: Fri Jul 07 17:12:13 UTC 2023
    - 3K bytes
    - Viewed (0)
Back to top