Spaces:
Sleeping
Sleeping
Download src/athai/hello.py from AnthonyTruchetPoC/persistent-docker: direct link, hf CLI and curl.
- Browser
- Download file 553 Bytes
-
https://huggingface.co/spaces/AnthonyTruchetPoC/persistent-docker/resolve/main/src/athai/hello.py
- Command line
-
hf download hf://spaces/AnthonyTruchetPoC/persistent-docker/src/athai/hello.py
-
curl -L -o hello.py https://huggingface.co/spaces/AnthonyTruchetPoC/persistent-docker/resolve/main/src/athai/hello.py
553 Bytes
| from typing import Optional | |
| print( | |
| f"executing the file '{__file__}'" | |
| f"in module '{__name__}' and package '{__package__}'" | |
| ) | |
| def build_greetings(name: Optional[str] = None) -> str: | |
| """ | |
| Return a greeting message, possibly customize with a name. | |
| >>> build_greetings() | |
| 'Hello, World!' | |
| >>> build_greetings('Toto') | |
| 'Nice to meet you, Toto!' | |
| """ | |
| return name and f"Nice to meet you, {name}!" or "Hello, World!" | |
| def main(): | |
| print(build_greetings()) | |
| if __name__ == "__main__": | |
| main() # pragma: no cover | |