Search Options

Results per page
Sort
Preferred Languages
Advance

Results 61 - 70 of 688 for Floats (0.1 sec)

  1. docs_src/body_multiple_params/tutorial004_an_py310.py

    from typing import Annotated
    
    from fastapi import Body, FastAPI
    from pydantic import BaseModel
    
    app = FastAPI()
    
    
    class Item(BaseModel):
        name: str
        description: str | None = None
        price: float
        tax: float | None = None
    
    
    class User(BaseModel):
        username: str
        full_name: str | None = None
    
    
    @app.put("/items/{item_id}")
    async def update_item(
        *,
        item_id: int,
        item: Item,
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sat Mar 18 12:29:59 UTC 2023
    - 643 bytes
    - Viewed (0)
  2. docs/em/docs/tutorial/extra-data-types.md

    # โž• ๐Ÿ’ฝ ๐Ÿ†Ž
    
    ๐Ÿ†™ ๐Ÿ”œ, ๐Ÿ‘† โœ”๏ธ โš™๏ธ โš  ๐Ÿ“Š ๐Ÿ†Ž, ๐Ÿ’–:
    
    * `int`
    * `float`
    * `str`
    * `bool`
    
    โœ‹๏ธ ๐Ÿ‘† ๐Ÿ’ช โš™๏ธ ๐ŸŒ… ๐Ÿ— ๐Ÿ“Š ๐Ÿ†Ž.
    
    & ๐Ÿ‘† ๐Ÿ”œ โœ”๏ธ ๐ŸŽ โš’ ๐Ÿ‘€ ๐Ÿ†™ ๐Ÿ”œ:
    
    * ๐Ÿ‘‘ ๐Ÿ‘จโ€๐ŸŽจ ๐Ÿ•โ€๐Ÿฆบ.
    * ๐Ÿ’ฝ ๐Ÿ› ๏ธ โšช๏ธโžก๏ธ ๐Ÿ“จ ๐Ÿ“จ.
    * ๐Ÿ’ฝ ๐Ÿ› ๏ธ ๐Ÿ“จ ๐Ÿ’ฝ.
    * ๐Ÿ’ฝ ๐Ÿ”ฌ.
    * ๐Ÿง โœ & ๐Ÿงพ.
    
    ## ๐ŸŽ ๐Ÿ’ฝ ๐Ÿ†Ž
    
    ๐Ÿ“ฅ ๐ŸŒ– ๐Ÿ“Š ๐Ÿ†Ž ๐Ÿ‘† ๐Ÿ’ช โš™๏ธ:
    
    * `UUID`:
        * ๐Ÿฉ "โญ ๐Ÿ˜ ๐Ÿ†”", โš  ๐Ÿ†” ๐Ÿ“š ๐Ÿ’ฝ & โš™๏ธ.
        * ๐Ÿ“จ & ๐Ÿ“จ ๐Ÿ”œ ๐ŸŽจ `str`.
    * `datetime.datetime`:
        * ๐Ÿ `datetime.datetime`.
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 2.6K bytes
    - Viewed (0)
  3. docs_src/body_multiple_params/tutorial004.py

    from typing import Union
    
    from fastapi import Body, FastAPI
    from pydantic import BaseModel
    
    app = FastAPI()
    
    
    class Item(BaseModel):
        name: str
        description: Union[str, None] = None
        price: float
        tax: Union[float, None] = None
    
    
    class User(BaseModel):
        username: str
        full_name: Union[str, None] = None
    
    
    @app.put("/items/{item_id}")
    async def update_item(
        *,
        item_id: int,
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Fri Mar 10 18:49:18 UTC 2023
    - 653 bytes
    - Viewed (0)
  4. docs_src/body_multiple_params/tutorial004_an.py

    from pydantic import BaseModel
    from typing_extensions import Annotated
    
    app = FastAPI()
    
    
    class Item(BaseModel):
        name: str
        description: Union[str, None] = None
        price: float
        tax: Union[float, None] = None
    
    
    class User(BaseModel):
        username: str
        full_name: Union[str, None] = None
    
    
    @app.put("/items/{item_id}")
    async def update_item(
        *,
        item_id: int,
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sat Mar 18 12:29:59 UTC 2023
    - 703 bytes
    - Viewed (0)
  5. docs_src/body_multiple_params/tutorial004_an_py39.py

    from fastapi import Body, FastAPI
    from pydantic import BaseModel
    
    app = FastAPI()
    
    
    class Item(BaseModel):
        name: str
        description: Union[str, None] = None
        price: float
        tax: Union[float, None] = None
    
    
    class User(BaseModel):
        username: str
        full_name: Union[str, None] = None
    
    
    @app.put("/items/{item_id}")
    async def update_item(
        *,
        item_id: int,
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sat Mar 18 12:29:59 UTC 2023
    - 674 bytes
    - Viewed (0)
  6. src/main/java/org/codelibs/fess/indexer/DocBoostMatcher.java

                return ((Long) value).floatValue();
            }
            if (value instanceof Float) {
                return (Float) value;
            }
            if (value instanceof Double) {
                return ((Double) value).floatValue();
            }
            if (value != null) {
                return Float.parseFloat(value.toString());
            }
    
            return 0.0f;
        }
    
    Registered: Thu Oct 31 13:40:30 UTC 2024
    - Last Modified: Fri Oct 11 21:11:58 UTC 2024
    - 2.8K bytes
    - Viewed (0)
  7. docs_src/response_model/tutorial006_py310.py

    from fastapi import FastAPI
    from pydantic import BaseModel
    
    app = FastAPI()
    
    
    class Item(BaseModel):
        name: str
        description: str | None = None
        price: float
        tax: float = 10.5
    
    
    items = {
        "foo": {"name": "Foo", "price": 50.2},
        "bar": {"name": "Bar", "description": "The Bar fighters", "price": 62, "tax": 20.2},
        "baz": {
            "name": "Baz",
            "description": "There goes my baz",
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Fri Jan 07 14:11:31 UTC 2022
    - 816 bytes
    - Viewed (0)
  8. tensorflow/c/eager/dlpack_test.cc

          } else {
            EXPECT_EQ(dltensor_out->strides[i],
                      dltensor_out->shape[i + 1] * dltensor_out->strides[i + 1]);
          }
        }
      }
      const float* data_in = static_cast<const float*>(dltensor_in->data);
      const float* data_out = static_cast<const float*>(dltensor_out->data);
      for (size_t j = 0; j < num_elements; ++j) {
        EXPECT_EQ(data_out[j], data_in[j]);
      }
    
      TFE_CallDLManagedTensorDeleter(dlm_out);
    Registered: Tue Nov 05 12:39:12 UTC 2024
    - Last Modified: Fri Jun 30 03:04:46 UTC 2023
    - 4.4K bytes
    - Viewed (0)
  9. docs_src/body_nested_models/tutorial007_py310.py

        name: str
    
    
    class Item(BaseModel):
        name: str
        description: str | None = None
        price: float
        tax: float | None = None
        tags: set[str] = set()
        images: list[Image] | None = None
    
    
    class Offer(BaseModel):
        name: str
        description: str | None = None
        price: float
        items: list[Item]
    
    
    @app.post("/offers/")
    async def create_offer(offer: Offer):
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Fri Jan 07 14:11:31 UTC 2022
    - 520 bytes
    - Viewed (0)
  10. docs_src/path_operation_configuration/tutorial005.py

    from typing import Set, Union
    
    from fastapi import FastAPI
    from pydantic import BaseModel
    
    app = FastAPI()
    
    
    class Item(BaseModel):
        name: str
        description: Union[str, None] = None
        price: float
        tax: Union[float, None] = None
        tags: Set[str] = set()
    
    
    @app.post(
        "/items/",
        response_model=Item,
        summary="Create an item",
        response_description="The created item",
    )
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sat May 14 11:59:59 UTC 2022
    - 741 bytes
    - Viewed (0)
Back to top