|
Download evaluation/solution.md from codeparrot/code-generation-models: direct link, hf CLI and curl.
- Browser
- Download file 365 Bytes
-
https://huggingface.co/spaces/codeparrot/code-generation-models/resolve/63a2bcd0923b82e8743a8f3f2f7db0bb0885c2cb/evaluation/solution.md
- Command line
-
hf download hf://spaces/codeparrot/code-generation-models@63a2bcd0923b82e8743a8f3f2f7db0bb0885c2cb/evaluation/solution.md
-
curl -L -o solution.md https://huggingface.co/spaces/codeparrot/code-generation-models/resolve/63a2bcd0923b82e8743a8f3f2f7db0bb0885c2cb/evaluation/solution.md
365 Bytes
def truncate_number(number: float) -> float:
""" Given a positive floating point number, it can be decomposed into
and integer part (largest integer smaller than given number) and decimals
(leftover part always smaller than 1).
Return the decimal part of the number.
>>> truncate_number(3.5)
0.5
"""
return number % 1