Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1091 - 1100 of 1,169 for def2 (0.04 sec)

  1. tensorflow/api_template_v1.__init__.py

    _site_packages_dirs = list(set(_site_packages_dirs))
    
    # Find the location of this exact file.
    _current_file_location = _inspect.getfile(_inspect.currentframe())
    
    def _running_from_pip_package():
      return any(
          _current_file_location.startswith(dir_) for dir_ in _site_packages_dirs)
    
    if _running_from_pip_package():
      # TODO(gunan): Add sanity checks to loaded modules here.
    
    Registered: Tue Nov 05 12:39:12 UTC 2024
    - Last Modified: Wed Oct 02 22:16:02 UTC 2024
    - 7.5K bytes
    - Viewed (0)
  2. docs/en/docs/tutorial/request-files.md

    For example, inside of an `async` *path operation function* you can get the contents with:
    
    ```Python
    contents = await myfile.read()
    ```
    
    If you are inside of a normal `def` *path operation function*, you can access the `UploadFile.file` directly, for example:
    
    ```Python
    contents = myfile.file.read()
    ```
    
    /// note | "`async` Technical Details"
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 10.2K bytes
    - Viewed (0)
  3. tensorflow/c/eager/parallel_device/parallel_device_lib_test.cc

          // Name
          "AssertAndCollective",
          // Args
          {"x: float", "condition: bool"},
          // Return values
          {"y: float"},
          // Attr def
          {},
          // Nodes
          {
              {{"assert"},
               "Assert",
               {"condition", "x"},
               {{"T", std::vector<DataType>{DT_FLOAT}}}},
              {{"y"},
    Registered: Tue Nov 05 12:39:12 UTC 2024
    - Last Modified: Mon Oct 21 04:14:14 UTC 2024
    - 15.6K bytes
    - Viewed (0)
  4. okhttp/src/test/java/okhttp3/internal/tls/CertificatePinnerChainValidationTest.kt

        server.enqueue(
          MockResponse.Builder()
            .body("def")
            .socketPolicy(DisconnectAtEnd)
            .build(),
        )
        val call2 =
          client.newCall(
            Request.Builder()
              .url(server.url("/"))
              .build(),
          )
        val response2 = call2.execute()
        assertThat(response2.body.string()).isEqualTo("def")
        response2.close()
      }
    
      @Test
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 23.8K bytes
    - Viewed (0)
  5. docs/ja/docs/tutorial/dependencies/sub-dependencies.md

    高度なシナリオでは、「キャッシュされた」値を使うのではなく、同じリクエストの各ステップ(おそらく複数回)で依存関係を呼び出す必要があることがわかっている場合、`Depens`を使用する際に、`use_cache=False`というパラメータを設定することができます。
    
    ```Python hl_lines="1"
    async def needy_dependency(fresh_value: str = Depends(get_value, use_cache=False)):
        return {"fresh_value": fresh_value}
    ```
    
    ## まとめ
    
    ここで使われている派手な言葉は別にして、**依存性注入** システムは非常にシンプルです。
    
    *path operation関数*と同じように見えるただの関数です。
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 4.4K bytes
    - Viewed (0)
  6. docs/em/docs/tutorial/request-files.md

    * `close()`: 🔐 📁.
    
    🌐 👫 👩‍🔬 `async` 👩‍🔬, 👆 💪 "⌛" 👫.
    
    🖼, 🔘 `async` *➡ 🛠️ 🔢* 👆 💪 🤚 🎚 ⏮️:
    
    ```Python
    contents = await myfile.read()
    ```
    
    🚥 👆 🔘 😐 `def` *➡ 🛠️ 🔢*, 👆 💪 🔐 `UploadFile.file` 🔗, 🖼:
    
    ```Python
    contents = myfile.file.read()
    ```
    
    /// note | "`async` 📡 ℹ"
    
    🕐❔ 👆 ⚙️ `async` 👩‍🔬, **FastAPI** 🏃 📁 👩‍🔬 🧵 &amp; ⌛ 👫.
    
    ///
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 6.6K bytes
    - Viewed (0)
  7. docs/lambda/README.md

    pip install flask requests
    ```
    
    Following is an example lambda handler.
    ```py
    from flask import Flask, request, abort, make_response
    import requests
    
    app = Flask(__name__)
    @app.route('/', methods=['POST'])
    def get_webhook():
    	if request.method == 'POST':
    		# obtain the request event from the 'POST' call
    		event = request.json
    
    		object_context = event["getObjectContext"]
    
    		# Get the presigned URL to fetch the requested
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Tue Apr 04 19:15:28 UTC 2023
    - 7.6K bytes
    - Viewed (0)
  8. docs/zh/docs/advanced/settings.md

    从磁盘中读取文件通常是一项耗时的(慢)操作,因此您可能希望仅在首次读取后并重复使用相同的设置对象,而不是为每个请求都读取它。
    
    但是,每次执行以下操作:
    
    ```Python
    Settings()
    ```
    
    都会创建一个新的 `Settings` 对象,并且在创建时会再次读取 `.env` 文件。
    
    如果依赖项函数只是这样的:
    
    ```Python
    def get_settings():
        return Settings()
    ```
    
    我们将为每个请求创建该对象,并且将在每个请求中读取 `.env` 文件。 ⚠️
    
    但是,由于我们在顶部使用了 `@lru_cache` 装饰器,因此只有在第一次调用它时,才会创建 `Settings` 对象一次。 ✔️
    
    //// tab | Python 3.9+
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 13.8K bytes
    - Viewed (0)
  9. docs/pt/docs/advanced/settings.md

    ```Python
    Settings()
    ```
    
    um novo objeto `Settings` é instanciado, e durante a instanciação, o arquivo `.env` é lido novamente.
    
    Se a função da dependência fosse apenas:
    
    ```Python
    def get_settings():
        return Settings()
    ```
    
    Iriamos criar um novo objeto a cada requisição, e estaríamos lendo o arquivo `.env` a cada requisição. ⚠️
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 17K bytes
    - Viewed (0)
  10. docs/fr/docs/features.md

    ```Python
    from datetime import date
    
    from pydantic import BaseModel
    
    # Déclare une variable comme étant une str
    # et profitez de l'aide de votre IDE dans cette fonction
    def main(user_id: str):
        return user_id
    
    
    # Un modèle Pydantic
    class User(BaseModel):
        id: int
        name: str
        joined: date
    ```
    Qui peuvent ensuite être utilisés comme cela:
    
    ```Python
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Tue Aug 06 04:48:30 UTC 2024
    - 11.1K bytes
    - Viewed (0)
Back to top